mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-29 17:07:19 +02:00
Bug #793
- Replaced timegm with equivalent code. Signed-off-by: Paul Beckingham <paul@beckingham.net>
This commit is contained in:
parent
8fbce0288e
commit
2bc8dfbfe7
2 changed files with 12 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue