(get_date): Let mktime deduce tm_isdst if we
authorJim Meyering <jim@meyering.net>
Thu, 20 May 1999 03:47:24 +0000 (03:47 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 20 May 1999 03:47:24 +0000 (03:47 +0000)
have an absolute timestamp, or if the relative timestamp
mentions days, months, or years.

lib/getdate.y

index 3807e2f82ce771e45276a2cbffa4aa10bff26078..bfaf2f1c1f5b016285be25c522e905560c2d8199 100644 (file)
@@ -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);