Fix compilation error with FMT_USE_LOCAL_TIME
This commit is contained in:
parent
0b52401b2b
commit
eedce0a747
@ -2144,8 +2144,8 @@ struct formatter<std::chrono::local_time<Duration>, Char>
|
|||||||
if (period::num != 1 || period::den != 1 ||
|
if (period::num != 1 || period::den != 1 ||
|
||||||
std::is_floating_point<typename Duration::rep>::value) {
|
std::is_floating_point<typename Duration::rep>::value) {
|
||||||
const auto epoch = val.time_since_epoch();
|
const auto epoch = val.time_since_epoch();
|
||||||
const auto subsecs = fmt_duration_cast<Duration>(
|
const auto subsecs = detail::fmt_duration_cast<Duration>(
|
||||||
epoch - fmt_duration_cast<std::chrono::seconds>(epoch));
|
epoch - detail::fmt_duration_cast<std::chrono::seconds>(epoch));
|
||||||
|
|
||||||
return formatter<std::tm, Char>::do_format(localtime(val), ctx, &subsecs);
|
return formatter<std::tm, Char>::do_format(localtime(val), ctx, &subsecs);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user