fix: fix tsim crash on windows due to invalid input to strftime
This commit is contained in:
parent
6c64b760a0
commit
8079532055
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue