From 1ea506c6d50714fd6bf6e73f85fe3a892dcdd2f1 Mon Sep 17 00:00:00 2001 From: ru Date: Thu, 17 May 2001 15:20:15 +0000 Subject: Fix an off-by-hour bug when crossing Daylight Saving Time boundary. PR: bin/27399 Submitted by: "Crist J. Clark" MFC after: 3 days --- bin/date/date.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bin/date') diff --git a/bin/date/date.c b/bin/date/date.c index 99ebfe6..b7b1656 100644 --- a/bin/date/date.c +++ b/bin/date/date.c @@ -268,6 +268,9 @@ setthetime(fmt, p, jflag, nflag) } } + /* Let mktime() decide whether summer time is in effect. */ + lt->tm_isdst = -1; + /* convert broken-down time to GMT clock time */ if ((tval = mktime(lt)) == -1) errx(1, "nonexistent time"); -- cgit v1.1