diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2024-10-11 09:40:38 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2024-10-11 15:48:17 +0100 |
commit | 4ad697bb7f1aad252e1398c6f13eed3fa6d0ca5b (patch) | |
tree | 33b421643faf22d7d7ef29ef7dec1eed4c05b955 /gcc/fortran/error.cc | |
parent | c10b442ee48484c1d15db2c91deac501b7e0b14e (diff) | |
download | gcc-4ad697bb7f1aad252e1398c6f13eed3fa6d0ca5b.zip gcc-4ad697bb7f1aad252e1398c6f13eed3fa6d0ca5b.tar.gz gcc-4ad697bb7f1aad252e1398c6f13eed3fa6d0ca5b.tar.bz2 |
libstdc++: Fix localized %c formatting for <chrono> [PR117085]
When formatting a time point with %c we call std::vformat_to using the
formatting locale's D_T_FMT string, but we weren't adding the L option
to the format string. This meant we always interpreted D_T_FMT in the C
locale, instead of using the formatting locale as obviously intended
when %c is used.
libstdc++-v3/ChangeLog:
PR libstdc++/117085
* include/bits/chrono_io.h (__formatter_chrono::_M_c): Add L
option to format string.
* testsuite/std/time/format.cc: Move to...
* testsuite/std/time/format/format.cc: ...here.
* testsuite/std/time/format_localized.cc: Move to...
* testsuite/std/time/format/localized.cc: ...here.
* testsuite/std/time/format/pr117085.cc: New test.
Diffstat (limited to 'gcc/fortran/error.cc')
0 files changed, 0 insertions, 0 deletions