Make UTC time on Windows
Windows has `_mkgmtime` for the UTC equivalent of `mktime`.
This commit is contained in:
1 parent
0fc8200ab4
commit
80b064f97b
1 file changed
+2
@@ -1238,6 +1238,8 @@ static time_t my_mktime(struct tm *tm) {
|
||||
if (t == (time_t)-1)
|
||||
return t;
|
||||
return t + tm->__tm_gmtoff;
|
||||
#elif WIN32
|
||||
return _mkgmtime(tm);
|
||||
#else
|
||||
char *tz;
|
||||
|
||||
|
||||
Reference in new issue
Block a user