summaryrefslogtreecommitdiff
path: root/lib/getdate.y
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-05-20 03:49:25 +0000
committerJim Meyering <jim@meyering.net>1999-05-20 03:49:25 +0000
commit0f5bb7dd4e4e710a3128c1a7d5c5350ac7b0f9f1 (patch)
treed585f403c9274cc99a0e78d88093c12f200c566f /lib/getdate.y
parenta0766fb80f07e01ea5e6c8eecfbb2942f457cbb3 (diff)
downloadcoreutils-0f5bb7dd4e4e710a3128c1a7d5c5350ac7b0f9f1.tar.xz
add the comment to go with last change
Diffstat (limited to 'lib/getdate.y')
-rw-r--r--lib/getdate.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/getdate.y b/lib/getdate.y
index bfaf2f1c1..9dc10483d 100644
--- a/lib/getdate.y
+++ b/lib/getdate.y
@@ -953,8 +953,12 @@ get_date (const char *p, const time_t *now)
tm.tm_hour += yyRelHour;
tm.tm_min += yyRelMinutes;
tm.tm_sec += yyRelSeconds;
+
+ /* Let mktime deduce tm_isdst if we have an absolute timestamp,
+ or if the relative timestamp mentions days, months, or years. */
if (yyHaveDate | yyHaveDay | yyHaveTime | yyRelDay | yyRelMonth | yyRelYear)
tm.tm_isdst = -1;
+
tm0 = tm;
Start = mktime (&tm);