diff options
Diffstat (limited to 'src/time/Convert.cxx')
-rw-r--r-- | src/time/Convert.cxx | 6 |
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__ */ |