fgerlits commented on code in PR #1518:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1518#discussion_r1121533398


##########
libminifi/include/utils/file/FileUtils.h:
##########
@@ -126,15 +126,24 @@ inline std::optional<std::filesystem::file_time_type> 
last_write_time(const std:
   return std::nullopt;
 }
 
-inline std::optional<std::string> format_time(const 
std::filesystem::file_time_type& time, const std::string& format) {
-  auto last_write_time_t = to_time_t(time);
+inline std::optional<std::string> format_time(const time_t& time, const 
std::string& format) {
   std::array<char, 128U> result{};
-  if (std::strftime(result.data(), result.size(), format.c_str(), 
gmtime(&last_write_time_t)) != 0) {
+  if (std::strftime(result.data(), result.size(), format.c_str(), 
gmtime(&time)) != 0) {
     return std::string(result.data());
   }
   return std::nullopt;
 }
 
+inline std::optional<std::string> format_time(const 
std::chrono::system_clock::time_point& time, const std::string& format) {

Review Comment:
   Makes sense, I've changed it in 9dc26a64f32870b99c9e9a562b37500b4638c943.



-- 
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