File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -1552,10 +1552,12 @@ FunctionManager::FunctionManager() {
15521552 return args[0 ].get ().getDate ().toString ();
15531553 }
15541554 case Value::Type::TIME: {
1555- return args[0 ].get ().getTime ().toString ();
1555+ Time utcTime = args[0 ].get ().getTime ();
1556+ return time::TimeUtils::utcToTime (utcTime).toString ();
15561557 }
15571558 case Value::Type::DATETIME: {
1558- return args[0 ].get ().getDateTime ().toString ();
1559+ DateTime dt = args[0 ].get ().getDateTime ();
1560+ return time::TimeUtils::utcToDateTime (dt).toString ();
15591561 }
15601562 default :
15611563 LOG (ERROR) << " toString has not been implemented for " << args[0 ].get ().type ();
@@ -1801,11 +1803,8 @@ FunctionManager::FunctionManager() {
18011803 attr.body_ = [](const auto &args) -> Value {
18021804 switch (args.size ()) {
18031805 case 0 : {
1804- auto result = time::TimeUtils::utcDate ();
1805- if (!result.ok ()) {
1806- return Value::kNullBadData ;
1807- }
1808- return Value (std::move (result).value ());
1806+ DateTime dt = time::TimeUtils::utcDateTime ();
1807+ return time::TimeUtils::utcToDateTime (dt).date ();
18091808 }
18101809 case 1 : {
18111810 if (args[0 ].get ().isStr ()) {
You can’t perform that action at this time.
0 commit comments