Set the tm_isdst flag to -1 before calling mktime(). Otherwise, the current
authorManuel Novoa III <mjn3@codepoet.org>
Wed, 23 Jul 2003 23:24:31 +0000 (23:24 -0000)
committerManuel Novoa III <mjn3@codepoet.org>
Wed, 23 Jul 2003 23:24:31 +0000 (23:24 -0000)
timezone setting is used for the new date.

coreutils/date.c

index 6e7aa1f0ce98eea3fe7a07fbf76012f42163c8c4..7d14ec325ce3d1a6568eb519c7fab4776fd3831b 100644 (file)
@@ -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);