$NetBSD: patch-ai,v 1.4 2008/05/02 08:50:46 adam Exp $ --- liboctave/oct-time.cc.orig 2008-04-21 18:00:20.000000000 +0200 +++ liboctave/oct-time.cc @@ -34,6 +34,8 @@ along with Octave; see the file COPYING. #include #endif +#include + #if defined (OCTAVE_USE_WINDOWS_API) #include #undef min @@ -358,6 +360,9 @@ octave_strptime::init (const std::string char *p = strsave (str.c_str ()); char *q = oct_strptime (p, fmt.c_str (), &t); + /* fill in wday and yday */ + t.tm_isdst = -1; + mktime(&t); // Fill in wday and yday, but only if mday is valid and the mon and year // are filled in, avoiding issues with mktime and invalid dates.