提交 4819b22a 编写于 作者: G Ganlin Zhao

fix: fix tsim crash on windows due to invalid input to strftime

上级 23ec9287
...@@ -213,8 +213,7 @@ static int32_t addTimezoneParam(SNodeList* pList) { ...@@ -213,8 +213,7 @@ static int32_t addTimezoneParam(SNodeList* pList) {
char buf[6] = {0}; char buf[6] = {0};
time_t t = taosTime(NULL); time_t t = taosTime(NULL);
struct tm tmInfo; struct tm tmInfo;
if (taosLocalTime(&t, &tmInfo, buf) == NULL) { if (taosLocalTime(&t, &tmInfo, buf) != NULL) {
} else {
strftime(buf, sizeof(buf), "%z", &tmInfo); strftime(buf, sizeof(buf), "%z", &tmInfo);
} }
int32_t len = (int32_t)strlen(buf); int32_t len = (int32_t)strlen(buf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册