File tree 1 file changed +6
-7
lines changed
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -1552,10 +1552,12 @@ FunctionManager::FunctionManager() {
1552
1552
return args[0 ].get ().getDate ().toString ();
1553
1553
}
1554
1554
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 ();
1556
1557
}
1557
1558
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 ();
1559
1561
}
1560
1562
default :
1561
1563
LOG (ERROR) << " toString has not been implemented for " << args[0 ].get ().type ();
@@ -1801,11 +1803,8 @@ FunctionManager::FunctionManager() {
1801
1803
attr.body_ = [](const auto &args) -> Value {
1802
1804
switch (args.size ()) {
1803
1805
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 ();
1809
1808
}
1810
1809
case 1 : {
1811
1810
if (args[0 ].get ().isStr ()) {
You can’t perform that action at this time.
0 commit comments