Skip to content
Myr

Make UTC time on Windows

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Windows has `_mkgmtime` for the UTC equivalent of `mktime`.

authored by Jason Hood · committed by Nico Williams · parent 0fc8200 · Browse files · 1 file+2 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−0 removed

  • other:+2 added−0 removed

1 file+2 added−0 removed

modified:src/builtin.c+2 added
1236 unmodified lines
1237 time_t t = mktime(tm);1238 if (t == (time_t)-1)1239 return t;1240 return t + tm->__tm_gmtoff;1241#elif WIN321242 return _mkgmtime(tm);1243#else1244 char *tz;12451246 tz = (tz = getenv("TZ")) != NULL ? strdup(tz) : NULL;
583 unmodified lines