diff --git a/date.h b/date.h index a638ebc..91935d2 100644 --- a/date.h +++ b/date.h @@ -4015,7 +4015,8 @@ format(const std::locale& loc, std::basic_string fmt, } auto& f = use_facet>(loc); basic_ostringstream os; - auto tt = system_clock::to_time_t(time_point_cast(sys_time{tp.time_since_epoch()})); + auto tt = system_clock::to_time_t( + floor(sys_time{tp.time_since_epoch()})); std::tm tm{}; #ifndef _MSC_VER gmtime_r(&tt, &tm);