From a4f78b63e6b40e86c051490ddf13342ba0f5a463 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Tue, 8 Feb 2022 14:29:41 +0800 Subject: [PATCH] [TD-11220](query): time related functions --- src/common/src/tvariant.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/src/tvariant.c b/src/common/src/tvariant.c index 8a46875bf5..66b6e856b5 100644 --- a/src/common/src/tvariant.c +++ b/src/common/src/tvariant.c @@ -93,6 +93,8 @@ void tVariantCreateExt(tVariant *pVar, SStrToken *token, int32_t optrType, bool case TSDB_DATA_TYPE_TIMESTAMP: { if (optrType == TK_NOW) { pVar->i64 = taosGetTimestamp(TSDB_TIME_PRECISION_NANO); + } else if (optrType == TK_TODAY) { + pVar->i64 = taosGetTimestampToday() * 1000000000; } else if (optrType == TK_PLUS || optrType == TK_MINUS) { char unit = 0; ret = parseAbsoluteDuration(token->z, token->n, &pVar->i64, &unit, TSDB_TIME_PRECISION_NANO); -- GitLab