fix: use mktime after 19700101 on windows

This commit is contained in:
kailixu 2023-08-07 19:30:54 +08:00
parent 59100a7251
commit b598c2651d
1 changed files with 4 additions and 0 deletions

View File

@ -447,6 +447,10 @@ time_t taosMktime(struct tm *timep) {
t.QuadPart -= offset.QuadPart;
return (time_t)(t.QuadPart / 10000000);
#else
time_t result = mktime(timep);
if (result != -1) {
return result;
}
#ifdef _MSC_VER
#if _MSC_VER >= 1900
int64_t tz = _timezone;