This commit is contained in:
Ardi Nugraha 2023-11-16 11:34:56 +08:00 committed by GitHub
commit 77ea5e91f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -2088,7 +2088,7 @@ struct formatter<std::chrono::time_point<std::chrono::system_clock, Duration>,
if (subsecs.count() < 0) { if (subsecs.count() < 0) {
auto second = auto second =
std::chrono::duration_cast<Duration>(std::chrono::seconds(1)); std::chrono::duration_cast<Duration>(std::chrono::seconds(1));
if (epoch.count() < ((Duration::min)() + second).count()) if ((epoch + second).count() < ((Duration::min)() + second).count())
FMT_THROW(format_error("duration is too small")); FMT_THROW(format_error("duration is too small"));
subsecs += second; subsecs += second;
val -= second; val -= second;