From 9bff316f1257c48982e33c6154b4f2ad394a371d Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Wed, 20 Jul 2022 16:19:25 +0800 Subject: [PATCH] os: fix win timestamp convert error --- source/os/src/osTime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/os/src/osTime.c b/source/os/src/osTime.c index 0cb4228e42..3c81ba3d9f 100644 --- a/source/os/src/osTime.c +++ b/source/os/src/osTime.c @@ -371,7 +371,7 @@ time_t taosMktime(struct tm *timep) { localtime_s(&tm1, &tt); ss.wYear = tm1.tm_year + 1900; ss.wMonth = tm1.tm_mon + 1; - ss.wDay = tm1.tm_wday; + ss.wDay = tm1.tm_mday; ss.wHour = tm1.tm_hour; ss.wMinute = tm1.tm_min; ss.wSecond = tm1.tm_sec; @@ -383,7 +383,7 @@ time_t taosMktime(struct tm *timep) { s.wYear = timep->tm_year + 1900; s.wMonth = timep->tm_mon + 1; - s.wDay = timep->tm_wday; + s.wDay = timep->tm_mday; s.wHour = timep->tm_hour; s.wMinute = timep->tm_min; s.wSecond = timep->tm_sec;