Fix an off-by-hour bug when crossing Daylight Saving Time boundary.

PR:		bin/27399
Submitted by:	"Crist J. Clark" <crist.clark@globalstar.com>
MFC after:	3 days
This commit is contained in:
ru 2001-05-17 15:20:15 +00:00
parent c632b830a9
commit 1ea506c6d5

View File

@ -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");