summaryrefslogtreecommitdiff
path: root/src/time
diff options
context:
space:
mode:
Diffstat (limited to 'src/time')
-rw-r--r--src/time/Convert.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/time/Convert.cxx b/src/time/Convert.cxx
index 2351f4b52..352c60604 100644
--- a/src/time/Convert.cxx
+++ b/src/time/Convert.cxx
@@ -77,15 +77,15 @@ static time_t
GetTimeZoneOffset() noexcept
{
time_t t = 1234567890;
- struct tm tm;
- tm.tm_isdst = 0;
#ifdef _WIN32
struct tm *p = gmtime(&t);
#else
+ struct tm tm;
+ tm.tm_isdst = 0;
struct tm *p = &tm;
gmtime_r(&t, p);
#endif
- return t - mktime(&tm);
+ return t - mktime(p);
}
#endif /* !__GLIBC__ */