From e4c5a44602e43859e2fd9e30599ac07b659fa39f Mon Sep 17 00:00:00 2001 From: Junwang Zhao Date: Fri, 25 Oct 2024 10:40:08 +0800 Subject: [PATCH] RETURN datetime() should return local time (#713) resolve https://github.com/TuGraph-family/tugraph-db/issues/691 Signed-off-by: Junwang Zhao --- src/cypher/arithmetic/arithmetic_expression.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cypher/arithmetic/arithmetic_expression.cpp b/src/cypher/arithmetic/arithmetic_expression.cpp index 08e6e19a6d..93e87ea553 100644 --- a/src/cypher/arithmetic/arithmetic_expression.cpp +++ b/src/cypher/arithmetic/arithmetic_expression.cpp @@ -762,7 +762,7 @@ cypher::FieldData BuiltinFunction::DateTime(RTContext *ctx, const Record &record if (args.size() > 2) CYPHER_ARGUMENT_ERROR(); if (args.size() == 1) { // datetime() Returns the current DateTime. - return cypher::FieldData(::lgraph::FieldData(::lgraph::DateTime::Now())); + return cypher::FieldData(::lgraph::FieldData(::lgraph::DateTime::LocalNow())); } else { CYPHER_THROW_ASSERT(args.size() == 2); // datetime(string) Returns a DateTime by parsing a string.