diff --git a/libi2pd/FS.cpp b/libi2pd/FS.cpp index f0b69123..6c82a0a2 100644 --- a/libi2pd/FS.cpp +++ b/libi2pd/FS.cpp @@ -260,12 +260,12 @@ namespace fs { std::error_code ec; auto t = std::filesystem::last_write_time (path, ec); if (ec) return 0; -/*#if __cplusplus >= 202002L // C++ 20 or higher +#if __cpp_lib_chrono >= 201907L // std::chrono::clock_cast const auto sctp = std::chrono::clock_cast(t); -#else */ // TODO: wait until implemented +#else const auto sctp = std::chrono::time_point_cast( t - decltype(t)::clock::now() + std::chrono::system_clock::now()); -/*#endif */ +#endif return std::chrono::system_clock::to_time_t(sctp); #else boost::system::error_code ec;