- Replaced timegm with equivalent code.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
This commit is contained in:
Owen Clarke 2011-06-27 22:49:37 -04:00 committed by Paul Beckingham
parent 8fbce0288e
commit 2bc8dfbfe7
2 changed files with 12 additions and 3 deletions

View file

@ -120,8 +120,8 @@
Clarke). Clarke).
+ Fixed bug #788, which reported regex and readline versions, even though they + Fixed bug #788, which reported regex and readline versions, even though they
are not used. are not used.
+ Fixed bug #792 & #794, so that cmake now recognizes Solaris (thanks to Owen + Fixed bug #792, #793 & #794, so that cmake now recognizes and builds on
Clarke). Solaris (thanks to Owen Clarke).
# Untracked Bugs, biggest first. # Untracked Bugs, biggest first.
+ Fixed bug that required the '%YAML' prologue in a YAML import. + Fixed bug that required the '%YAML' prologue in a YAML import.

View file

@ -578,7 +578,16 @@ bool Nibbler::getDateISO (time_t& t)
tms.tm_min = minute; tms.tm_min = minute;
tms.tm_sec = second; 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; return true;
} }
} }