From: Manuel Novoa III Date: Wed, 23 Jul 2003 23:24:31 +0000 (-0000) Subject: Set the tm_isdst flag to -1 before calling mktime(). Otherwise, the current X-Git-Tag: 1_00_pre2~37 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b511f9cea92b6a8965812829218e8e327487de71;p=oweals%2Fbusybox.git Set the tm_isdst flag to -1 before calling mktime(). Otherwise, the current timezone setting is used for the new date. --- diff --git a/coreutils/date.c b/coreutils/date.c index 6e7aa1f0c..7d14ec325 100644 --- a/coreutils/date.c +++ b/coreutils/date.c @@ -209,6 +209,7 @@ int date_main(int argc, char **argv) } /* Correct any day of week and day of year etc. fields */ + tm_time.tm_isdst = -1; /* Be sure to recheck dst. */ tm = mktime(&tm_time); if (tm < 0) { bb_error_msg_and_die(bb_msg_invalid_date, date_str);