diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 2d510783..f47ff753 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -433,8 +433,8 @@ template ::value)> inline std::chrono::duration get_milliseconds( std::chrono::duration d) { - return std::chrono::duration( - mod(d.count() * Period::num / Period::den * 1000, 1000)); + auto ms = mod(d.count() * Period::num / Period::den * 1000, 1000); + return std::chrono::duration(static_cast(ms)); } template