diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index ade6ec0ac406..e43eed2eaa2e 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1281,7 +1281,7 @@ class tm_writer { std::time_t gt = std::mktime(>m); std::tm ltm = gmtime(gt); std::time_t lt = std::mktime(<m); - long offset = gt - lt; + long offset = static_cast(gt - lt); write_utc_offset(offset, ns); #endif }