From d1d1aae7305dfd05055f7439e58158efa30f3e76 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Mon, 13 Oct 2025 00:20:33 -0500 Subject: [PATCH] Core: Movie and State: Add 'L' option to fmt format string to actually use the current locale. --- Source/Core/Core/Movie.cpp | 4 ++-- Source/Core/Core/State.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/Movie.cpp b/Source/Core/Core/Movie.cpp index aee5e4707a6..09ea4a0d7af 100644 --- a/Source/Core/Core/Movie.cpp +++ b/Source/Core/Core/Movie.cpp @@ -159,8 +159,8 @@ std::string MovieManager::GetRTCDisplay() const const time_t current_time = CEXIIPL::GetEmulatedTime(m_system, CEXIIPL::UNIX_EPOCH); const tm gm_time = fmt::gmtime(current_time); - // Use current locale for formatting time, as fmt is locale-agnostic by default. - return fmt::format(std::locale{""}, "Date/Time: {:%c}", gm_time); + // Using L for locale-dependant formatting. + return fmt::format(std::locale{""}, "Date/Time: {:L%c}", gm_time); } // NOTE: GPU Thread diff --git a/Source/Core/Core/State.cpp b/Source/Core/Core/State.cpp index ffd811bd6c7..1714e3add1b 100644 --- a/Source/Core/Core/State.cpp +++ b/Source/Core/Core/State.cpp @@ -285,8 +285,8 @@ static std::string SystemTimeAsDoubleToString(double time) if (!local_time) return ""; - // fmt is locale agnostic by default, so explicitly use current locale. - return fmt::format(std::locale{""}, "{:%x %X}", *local_time); + // Using L for locale-dependant formatting. + return fmt::format(std::locale{""}, "{:L%x %X}", *local_time); } static std::string MakeStateFilename(int number);