From 9788532a0ab81e05e36e5b340ceb3ff239ec2ad1 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Fri, 24 Mar 2023 14:50:56 +0800 Subject: [PATCH] fix --- source/os/src/osTime.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/os/src/osTime.c b/source/os/src/osTime.c index 28be12e908..5d5bff8c48 100644 --- a/source/os/src/osTime.c +++ b/source/os/src/osTime.c @@ -413,6 +413,8 @@ struct tm *taosLocalTime(const time_t *timep, struct tm *result) { } #ifdef WINDOWS if (*timep < 0) { + return NULL; + // TODO: bugs in following code SYSTEMTIME ss, s; FILETIME ff, f; LARGE_INTEGER offset; @@ -473,6 +475,8 @@ struct tm *taosLocalTimeNolock(struct tm *result, const time_t *timep, int dst) } #ifdef WINDOWS if (*timep < 0) { + return NULL; + // TODO: bugs in following code SYSTEMTIME ss, s; FILETIME ff, f; LARGE_INTEGER offset;