diff options
author | Alexey Soloviev <EXT-Alexey.Soloviev@nokia.com> | 2010-12-31 05:21:51 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-12-31 05:21:51 +0100 |
commit | a5d3d3436b16bf6e1a92ed969e171ac812e8f906 (patch) | |
tree | a4fe6c805f31f97c445efaa5eb2e8378e7b1540c /coreutils | |
parent | a9e25ffa678a357c581b9b7f65a7b2ce1ae2a63e (diff) | |
download | busybox-w32-a5d3d3436b16bf6e1a92ed969e171ac812e8f906.tar.gz busybox-w32-a5d3d3436b16bf6e1a92ed969e171ac812e8f906.tar.bz2 busybox-w32-a5d3d3436b16bf6e1a92ed969e171ac812e8f906.zip |
date: preserve isdst value if date is in time_t (unix time) format
Signed-off-by: Alexey Soloviev <EXT-Alexey.Soloviev@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/date.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/coreutils/date.c b/coreutils/date.c index c73fb5be6..6ad5f1bb6 100644 --- a/coreutils/date.c +++ b/coreutils/date.c | |||
@@ -282,7 +282,9 @@ int date_main(int argc UNUSED_PARAM, char **argv) | |||
282 | } | 282 | } |
283 | 283 | ||
284 | /* Correct any day of week and day of year etc. fields */ | 284 | /* Correct any day of week and day of year etc. fields */ |
285 | tm_time.tm_isdst = -1; /* Be sure to recheck dst */ | 285 | /* Be sure to recheck dst (but not if date is time_t format) */ |
286 | if (date_str[0] != '@') | ||
287 | tm_time.tm_isdst = -1; | ||
286 | ts.tv_sec = validate_tm_time(date_str, &tm_time); | 288 | ts.tv_sec = validate_tm_time(date_str, &tm_time); |
287 | 289 | ||
288 | maybe_set_utc(opt); | 290 | maybe_set_utc(opt); |