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

[TD-13970]<feature>: timestamp format shortcut

上级 64877f0f
......@@ -336,8 +336,11 @@ 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)) {
return -1;
}
}
#ifdef _MSC_VER
#if _MSC_VER >= 1900
......@@ -378,8 +381,11 @@ 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)) {
return -1;
}
}
/* mktime will be affected by TZ, set by using taos_options */
int64_t seconds = mktime(&tm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册