diff options
| author | Dentomologist <dentomologist@gmail.com> | 2026-10-16 15:26:22 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-10-16 15:26:22 -0700 |
| commit | a4be0d255fc440232300b5dede85ba4a26fec015 (patch) | |
| tree | cf0cdf3d5b4342fc0f77ddb841dc207d605fa2a0 /Source/Core | |
| parent | 8d2ad1a662472955497e5bb79d7b9ec6999e1f0d (diff) | |
| parent | cbac65d3261faed761589ed3eede2946c726e403 (diff) | |
Merge pull request #14017 from jordan-woyak/fmt-locale-date-fix
Core: Movie and State: Add 'L' option to fmt format string to actually use the current locale.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/Movie.cpp | 4 | ||||
| -rw-r--r-- | 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 046861b7b2..fe5e55c0c9 100644 --- a/Source/Core/Core/Movie.cpp +++ b/Source/Core/Core/Movie.cpp @@ -7,7 +7,6 @@ #include <array> #include <cstring> #include <iterator> -#include <locale> #include <mbedtls/md.h> #include <mutex> #include <thread> @@ -159,7 +158,8 @@ std::string MovieManager::GetRTCDisplay() const const tm gm_time = fmt::gmtime(current_time); // Use current locale for formatting time, as fmt is locale-agnostic by default. - return fmt::format(Common::GetEnvironmentLocale(), "Date/Time: {:%c}", gm_time); + // Using L for locale-dependent formatting. + return fmt::format(Common::GetEnvironmentLocale(), "Date/Time: {:L%c}", gm_time); } // NOTE: GPU Thread diff --git a/Source/Core/Core/State.cpp b/Source/Core/Core/State.cpp index 3a36ec6021..cecda5f4e8 100644 --- a/Source/Core/Core/State.cpp +++ b/Source/Core/Core/State.cpp @@ -5,7 +5,6 @@ #include <algorithm> #include <filesystem> -#include <locale> #include <map> #include <mutex> #include <shared_mutex> @@ -301,7 +300,8 @@ static std::string SystemTimeAsDoubleToString(double time) return ""; // fmt is locale agnostic by default, so explicitly use current locale. - return fmt::format(Common::GetEnvironmentLocale(), "{:%x %X}", *local_time); + // Using L for locale-dependent formatting. + return fmt::format(Common::GetEnvironmentLocale(), "{:L%x %X}", *local_time); } static std::string MakeStateFilename(u32 number) |
