fix: fix tsim crash on windows due to invalid input to strftime
This commit is contained in:
parent
23ec9287c9
commit
4819b22a21
|
@ -213,8 +213,7 @@ static int32_t addTimezoneParam(SNodeList* pList) {
|
|||
char buf[6] = {0};
|
||||
time_t t = taosTime(NULL);
|
||||
struct tm tmInfo;
|
||||
if (taosLocalTime(&t, &tmInfo, buf) == NULL) {
|
||||
} else {
|
||||
if (taosLocalTime(&t, &tmInfo, buf) != NULL) {
|
||||
strftime(buf, sizeof(buf), "%z", &tmInfo);
|
||||
}
|
||||
int32_t len = (int32_t)strlen(buf);
|
||||
|
|
Loading…
Reference in New Issue