aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormjn3 <mjn3@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-07-23 23:24:31 +0000
committermjn3 <mjn3@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-07-23 23:24:31 +0000
commit4b332bb6a7c01912520065feddc25c72e05d7e95 (patch)
tree9c695f90c149c17cbb304b5e64ba3d42a82099b9
parentdd884430be90a3c2c30480724ff96697ac218572 (diff)
downloadbusybox-w32-4b332bb6a7c01912520065feddc25c72e05d7e95.tar.gz
busybox-w32-4b332bb6a7c01912520065feddc25c72e05d7e95.tar.bz2
busybox-w32-4b332bb6a7c01912520065feddc25c72e05d7e95.zip
Set the tm_isdst flag to -1 before calling mktime(). Otherwise, the current
timezone setting is used for the new date. git-svn-id: svn://busybox.net/trunk/busybox@7103 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--coreutils/date.c1
1 files changed, 1 insertions, 0 deletions
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)
209 } 209 }
210 210
211 /* Correct any day of week and day of year etc. fields */ 211 /* Correct any day of week and day of year etc. fields */
212 tm_time.tm_isdst = -1; /* Be sure to recheck dst. */
212 tm = mktime(&tm_time); 213 tm = mktime(&tm_time);
213 if (tm < 0) { 214 if (tm < 0) {
214 bb_error_msg_and_die(bb_msg_invalid_date, date_str); 215 bb_error_msg_and_die(bb_msg_invalid_date, date_str);