From da688f6be416ba475a45950430445508c72a3f3d Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Tue, 15 Mar 2022 19:17:56 +0800 Subject: [PATCH] Merge branch 'develop' into feature/TD-13970 --- src/os/src/detail/osTime.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/os/src/detail/osTime.c b/src/os/src/detail/osTime.c index e25178f2d5..073d0eed89 100644 --- a/src/os/src/detail/osTime.c +++ b/src/os/src/detail/osTime.c @@ -337,7 +337,8 @@ int32_t parseLocaltime(char* timestr, int64_t* time, int32_t timePrec, char deli if (str == NULL) { //if parse failed, try "%Y-%m-%d" format - if (!strptime(timestr, "%Y-%m-%d", &tm)) { + str = strptime(timestr, "%Y-%m-%d", &tm); + if (str == NULL) { return -1; } } @@ -382,7 +383,8 @@ int32_t parseLocaltimeWithDst(char* timestr, int64_t* time, int32_t timePrec, ch if (str == NULL) { //if parse failed, try "%Y-%m-%d" format - if (!strptime(timestr, "%Y-%m-%d", &tm)) { + str = strptime(timestr, "%Y-%m-%d", &tm); + if (str == NULL) { return -1; } } -- GitLab