diff options
author | Jim Meyering <jim@meyering.net> | 1999-05-20 03:47:24 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-05-20 03:47:24 +0000 |
commit | a0766fb80f07e01ea5e6c8eecfbb2942f457cbb3 (patch) | |
tree | 0a2b6ee028428171f7d49161a0df0046d0f645fd /lib | |
parent | 867c8b0e85a1fe68e17f7be18c0982ae3ea82f7f (diff) | |
download | coreutils-a0766fb80f07e01ea5e6c8eecfbb2942f457cbb3.tar.xz |
(get_date): Let mktime deduce tm_isdst if we
have an absolute timestamp, or if the relative timestamp
mentions days, months, or years.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/getdate.y | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/getdate.y b/lib/getdate.y index 3807e2f82..bfaf2f1c1 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); |