Bug #793
- Replaced timegm with equivalent code. Signed-off-by: Paul Beckingham <paul@beckingham.net>
This commit is contained in:
committed by
Paul Beckingham
parent
8fbce0288e
commit
2bc8dfbfe7
@@ -578,7 +578,16 @@ bool Nibbler::getDateISO (time_t& t)
|
||||
tms.tm_min = minute;
|
||||
tms.tm_sec = second;
|
||||
|
||||
t = timegm (&tms);
|
||||
char *tz = getenv ("TZ");
|
||||
setenv ("TZ", "", 1);
|
||||
tzset ();
|
||||
t = mktime (&tms);
|
||||
if (tz)
|
||||
setenv ("TZ", tz, 1);
|
||||
else
|
||||
unsetenv ("TZ");
|
||||
tzset();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user