mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
(get_date): Let mktime deduce tm_isdst if we
have an absolute timestamp, or if the relative timestamp mentions days, months, or years.
This commit is contained in:
1 parent
867c8b0e85
commit
a0766fb80f
1 file changed
+2
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user