Skip to content
Snippets Groups Projects
Commit 16749a4b authored by sbbs's avatar sbbs
Browse files

Bug-fix: occassionall, on Linux at least, xpTimeZone_local() would return

the wrong timezone (off by an hour) because we were passing an uninitialized
time_t value to localtime_r(). -- oops.
parent 1d43b963
No related branches found
No related tags found
No related merge requests found
......@@ -89,7 +89,7 @@ xpTimeZone_t DLLCALL xpTimeZone_local(void)
{
#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DARWIN__) || defined(__linux__)
struct tm tm;
time_t t;
time_t t=time(NULL);
localtime_r(&t, &tm);
return(tm.tm_gmtoff/60);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment