提交 80795320 编写于 作者: G Ganlin Zhao

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

上级 6c64b760
...@@ -473,7 +473,7 @@ static char* shellFormatTimestamp(char* buf, int64_t val, int32_t precision) { ...@@ -473,7 +473,7 @@ static char* shellFormatTimestamp(char* buf, int64_t val, int32_t precision) {
struct tm ptm; struct tm ptm;
if (taosLocalTime(&tt, &ptm) == NULL) { if (taosLocalTime(&tt, &ptm) == NULL) {
sprintf(tt, "NaN"); sprintf(buf, "NaN");
return buf; return buf;
} }
size_t pos = strftime(buf, 35, "%Y-%m-%d %H:%M:%S", &ptm); size_t pos = strftime(buf, 35, "%Y-%m-%d %H:%M:%S", &ptm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册