diff --git a/src/common/src/texpr.c b/src/common/src/texpr.c index e40910bf1a3ef40072b12daed356e7caf606d995..565c65e8509a372c37098032e5c6af92db883e6a 100644 --- a/src/common/src/texpr.c +++ b/src/common/src/texpr.c @@ -1189,7 +1189,8 @@ int32_t exprValidateTimeNode(tExprNode *pExpr) { return TSDB_CODE_TSC_OUT_OF_MEMORY; } child->pVal->nType = TSDB_DATA_TYPE_TIMESTAMP; - child->pVal->i64 = taosGetTimestampToday() * pExpr->_func.precision; + int64_t timeValSec = taosGetTimestampToday() * 1000; + child->pVal->i64 = convertTimePrecision(timeValSec, TSDB_TIME_PRECISION_MILLI, pExpr->_func.precision); pExpr->resultType = TSDB_DATA_TYPE_TIMESTAMP; pExpr->resultBytes = (int16_t)tDataTypes[pExpr->resultType].bytes; break;