szaszm commented on code in PR #1528:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1528#discussion_r1150138533


##########
extensions/expression-language/Expression.cpp:
##########
@@ -633,35 +633,46 @@ Value expr_escapeCsv(const std::vector<Value> &args) {
 }
 
 Value expr_format(const std::vector<Value> &args) {
-  std::chrono::milliseconds dur(args[0].asUnsignedLong());
-  std::chrono::system_clock::time_point dt(dur);
-  auto zone = date::current_zone();
-  if (args.size() > 2) {
-    zone = date::locate_zone(args[2].asString());
-  }
-  auto t = date::make_zoned(zone, dt);
-  std::stringstream result_s;
-  result_s << date::format(args[1].asString(), t);
-  return Value(result_s.str());
+  using std::chrono::milliseconds;
+
+  date::sys_time<milliseconds> 
utc_time_point{milliseconds(args[0].asUnsignedLong())};

Review Comment:
   Is this really UTC? I thought sys_time is using the local timezone.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to