martinzink commented on code in PR #1560: URL: https://github.com/apache/nifi-minifi-cpp/pull/1560#discussion_r1185767400
########## libminifi/src/utils/file/FileUtils.cpp: ########## @@ -66,21 +66,21 @@ bool contains(const std::filesystem::path& file_path, std::string_view text_to_s return std::search(view.begin(), view.end(), searcher) != view.end(); } -time_t to_time_t(std::filesystem::file_time_type file_time) { -#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 14000 - return std::chrono::file_clock::to_time_t(file_time); +std::chrono::system_clock::time_point to_sys(std::filesystem::file_time_type file_time) { + using namespace std::chrono; // NOLINT(build/namespaces) +#if defined(WIN32) || (defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION < 14000)) + return system_clock::now() + duration_cast<system_clock::duration>(file_time - file_clock::now()); Review Comment: More info on the windows issue: https://github.com/microsoft/STL/issues/2446 -- 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: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org