diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 85d152f0..2d69db0c 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -411,7 +411,7 @@ struct formatter auto format(std::chrono::time_point val, FormatContext& ctx) -> decltype(ctx.out()) { - std::tm time = localtime(val); + std::tm time; auto epoch = val.time_since_epoch(); auto seconds = std::chrono::duration_cast(epoch); auto subseconds = std::chrono::duration_cast>(epoch - seconds); @@ -419,6 +419,8 @@ struct formatter 0) {