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:
parent
c632b830a9
commit
1ea506c6d5
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user