From: Jim Meyering Date: Thu, 20 May 1999 03:47:24 +0000 (+0000) Subject: (get_date): Let mktime deduce tm_isdst if we X-Git-Tag: TEXTUTILS-1_22m~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a0766fb80f07e01ea5e6c8eecfbb2942f457cbb3;p=thirdparty%2Fcoreutils.git (get_date): Let mktime deduce tm_isdst if we have an absolute timestamp, or if the relative timestamp mentions days, months, or years. --- diff --git a/lib/getdate.y b/lib/getdate.y index 3807e2f82c..bfaf2f1c1f 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -953,6 +953,8 @@ get_date (const char *p, const time_t *now) tm.tm_hour += yyRelHour; tm.tm_min += yyRelMinutes; tm.tm_sec += yyRelSeconds; + if (yyHaveDate | yyHaveDay | yyHaveTime | yyRelDay | yyRelMonth | yyRelYear) + tm.tm_isdst = -1; tm0 = tm; Start = mktime (&tm);