summaryrefslogtreecommitdiff
path: root/coreutils/date.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/date.c')
-rw-r--r--coreutils/date.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/coreutils/date.c b/coreutils/date.c
index c73fb5b..6ad5f1b 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -282,7 +282,9 @@ int date_main(int argc UNUSED_PARAM, char **argv)
}
/* Correct any day of week and day of year etc. fields */
- tm_time.tm_isdst = -1; /* Be sure to recheck dst */
+ /* Be sure to recheck dst (but not if date is time_t format) */
+ if (date_str[0] != '@')
+ tm_time.tm_isdst = -1;
ts.tv_sec = validate_tm_time(date_str, &tm_time);
maybe_set_utc(opt);