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

[TD-11220]<feature>(query): time related functions

上级 3e6a8101
......@@ -77,6 +77,15 @@ static FORCE_INLINE int64_t taosGetTimestamp(int32_t precision) {
}
}
//@return timestamp of today at 00:00:00 in seconds
static FORCE_INLINE int64_t taosGetTimestampToday() {
time_t t = time(NULL);
struct tm * tm= localtime(&t);
tm->tm_hour = 0;
tm->tm_min = 0;
tm->tm_sec = 0;
return (int64_t)mktime(tm);
}
typedef struct SInterval {
int32_t tz; // query client timezone
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册