diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 08e25fa5..e3855880 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -2123,7 +2123,6 @@ struct formatter, Char> { format_specs specs_; detail::arg_ref width_ref_; detail::arg_ref precision_ref_; - bool localized_ = false; basic_string_view fmt_; public: @@ -2146,7 +2145,7 @@ struct formatter, Char> { it = detail::parse_precision(it, end, specs_, precision_ref_, ctx); } if (it != end && *it == 'L') { - localized_ = true; + specs_.set_localized(); ++it; } end = detail::parse_chrono_format(it, end, checker); @@ -2177,7 +2176,7 @@ struct formatter, Char> { detail::duration_formatter; auto f = duration_formatter(ctx.locale(), out, d); f.precision = precision; - f.localized = localized_; + f.localized = specs_.localized(); detail::parse_chrono_format(begin, end, f); } return detail::write(