Fix time_point formatting
This commit is contained in:
parent
8f18e72df5
commit
f5c615b0ee
@ -2142,7 +2142,8 @@ struct formatter<std::chrono::time_point<std::chrono::system_clock, Duration>,
|
|||||||
epoch - std::chrono::duration_cast<std::chrono::seconds>(epoch));
|
epoch - std::chrono::duration_cast<std::chrono::seconds>(epoch));
|
||||||
|
|
||||||
if (subsecs.count() < 0) {
|
if (subsecs.count() < 0) {
|
||||||
auto second = std::chrono::seconds(1);
|
auto second = std::chrono::duration_cast<Duration>(
|
||||||
|
std::chrono::seconds(1));
|
||||||
if (epoch.count() < ((Duration::min)() + second).count())
|
if (epoch.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;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user