https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117214
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:c24a1d58bc02daabafd5c94fca0984b70db811c8 commit r15-8490-gc24a1d58bc02daabafd5c94fca0984b70db811c8 Author: XU Kailiang <xu2k...@outlook.com> Date: Sat Mar 1 13:23:21 2025 +0800 libstdc++: Fix localized D_T_FMT %c formatting for <chrono> [PR117214] Formatting a time point with %c was implemented by calling std::vprint_to with format string constructed from locale's D_T_FMT string, but in some locales this string contains strftime specifiers which are not valid for chrono-specs, e.g. %l. So just use _M_locale_fmt to avoid this problem. libstdc++-v3/ChangeLog: PR libstdc++/117214 * include/bits/chrono_io.h (__formatter_chrono::_M_c): Use _M_locale_fmt to format %c time point. * testsuite/std/time/format/pr117214.cc: New test. Signed-off-by: XU Kailiang <xu2k...@outlook.com> Co-authored-by: Jonathan Wakely <jwak...@redhat.com>