From 80b064f97b0429c4efa9abc7c045c26b3ab3e640 Mon Sep 17 00:00:00 2001 From: Jason Hood Date: Thu, 14 Feb 2019 18:42:51 +1000 Subject: [PATCH] Make UTC time on Windows Windows has `_mkgmtime` for the UTC equivalent of `mktime`. --- src/builtin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/builtin.c b/src/builtin.c index 3cde61a3..eb2cd876 100644 --- a/src/builtin.c +++ b/src/builtin.c @@ -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;