X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=lib%2Fgetdate.y;h=3525295bb39854409c3dd3f4e5db46bd823f5711;hb=3698b9585bfe8a47ca39b9df9ae57db953b90393;hp=a87f9be0b9735ce2d3b8fbdd0acaac156d110b34;hpb=44579f77cffc864baa652e15f8ff9a490f13e45e;p=chaz%2Ftar diff --git a/lib/getdate.y b/lib/getdate.y index a87f9be..3525295 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -85,7 +85,7 @@ #define TM_YEAR_BASE 1900 #define HOUR(x) ((x) * 60) - + /* An integer value, and the number of digits in its textual representation. */ typedef struct @@ -168,7 +168,7 @@ static int yylex (); /* This grammar has 13 shift/reduce conflicts. */ %expect 13 - + %union { int intval; @@ -990,7 +990,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 +1038,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;