X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgetdate.y;h=f16a28e3daa5e3df1c2c07657a6621f2eb61f264;hb=d36212cb0a461bc3f063ecbcb1c4d88316eaa397;hp=3210e53676f768d391a60742351d518818489cf1;hpb=2880c2d2c77d46828d7bc00141716a97e05dd908;p=gnulib.git diff --git a/lib/getdate.y b/lib/getdate.y index 3210e5367..f16a28e3d 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -448,6 +448,7 @@ o_merid: may define-away `const'. We want the prototype for get_date to have the same signature as the function definition. */ #include "getdate.h" +#include "unlocked-io.h" #ifndef gmtime struct tm *gmtime (); @@ -990,7 +991,8 @@ get_date (const char *p, const time_t *now) /* Let mktime deduce tm_isdst if we have an absolute time stamp, or if the relative time stamp mentions days, months, or years. */ - if (pc.dates_seen | pc.days_seen | pc.times_seen | pc.rel_day | pc.rel_month | pc.rel_year) + if (pc.dates_seen | pc.days_seen | pc.times_seen | pc.rel_day + | pc.rel_month | pc.rel_year) tm.tm_isdst = -1; /* But if the input explicitly specifies local time with or without @@ -1037,6 +1039,7 @@ get_date (const char *p, const time_t *now) { tm.tm_mday += ((pc.day_number - tm.tm_wday + 7) % 7 + 7 * (pc.day_ordinal - (0 < pc.day_ordinal))); + tm.tm_isdst = -1; Start = mktime (&tm); if (Start == (time_t) -1) return Start;