summaryrefslogtreecommitdiff
path: root/coreutils/date.c
diff options
context:
space:
mode:
authorManuel Novoa III2003-07-23 23:24:31 +0000
committerManuel Novoa III2003-07-23 23:24:31 +0000
commitb511f9cea92b6a8965812829218e8e327487de71 (patch)
tree9c695f90c149c17cbb304b5e64ba3d42a82099b9 /coreutils/date.c
parente5272074c9bf554fa9f24a97899de584b1c127c2 (diff)
downloadbusybox-b511f9cea92b6a8965812829218e8e327487de71.zip
busybox-b511f9cea92b6a8965812829218e8e327487de71.tar.gz
Set the tm_isdst flag to -1 before calling mktime(). Otherwise, the current
timezone setting is used for the new date.
Diffstat (limited to 'coreutils/date.c')
-rw-r--r--coreutils/date.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/coreutils/date.c b/coreutils/date.c
index 6e7aa1f..7d14ec3 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);