diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index df4b81ae54cb..7828656b1b53 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1214,7 +1214,7 @@ template class tm_writer { char buf[10]; size_t offset = 0; if (year >= 0 && year < 10000) { - copy2(buf, digits2(to_unsigned(year / 100))); + copy2(buf, digits2(static_cast(year / 100))); } else { offset = 4; write_year_extended(year);