提交 bf2cc7c4 编写于 作者: sangshuduo's avatar sangshuduo

fix timezone build issue with msvc on Windows.

上级 58efbd6b
......@@ -59,6 +59,10 @@ int64_t user_mktime64(const unsigned int year0, const unsigned int mon0,
int64_t res = (((((int64_t) (year/4 - year/100 + year/400 + 367*mon/12 + day) +
year*365 - 719499)*24 + hour)*60 + min)*60 + sec);
#if defined(WINDOWS) && _MSC_VER >= 1900
// see https://docs.microsoft.com/en-us/cpp/c-runtime-library/daylight-dstbias-timezone-and-tzname?view=vs-2019
int64_t timezone = _timezone;
#endif
return (res + timezone);
}
// ==== mktime() kernel code =================//
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册