While revision 1.26 fixed the code to really subtract 3600 due to
daylight-saving, this was actually wrong because mktime() already does that for us.
This commit is contained in:
parent
11293f3595
commit
e924b3caca
@ -619,12 +619,10 @@ parsetime(int argc, char **argv)
|
|||||||
} /* ugly case statement */
|
} /* ugly case statement */
|
||||||
expect(EOF);
|
expect(EOF);
|
||||||
|
|
||||||
/* adjust for daylight savings time
|
/* convert back to time_t
|
||||||
*/
|
*/
|
||||||
runtime.tm_isdst = -1;
|
runtime.tm_isdst = -1;
|
||||||
runtimer = mktime(&runtime);
|
runtimer = mktime(&runtime);
|
||||||
if (runtime.tm_isdst > 0)
|
|
||||||
runtimer -= 3600;
|
|
||||||
|
|
||||||
if (runtimer < 0)
|
if (runtimer < 0)
|
||||||
panic("garbled time");
|
panic("garbled time");
|
||||||
|
Loading…
Reference in New Issue
Block a user