summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2026-10-08 15:18:04 -0500
committerJordan Woyak <jordan.woyak@gmail.com>2026-10-09 13:06:42 -0500
commitcbac65d3261faed761589ed3eede2946c726e403 (patch)
treededd95cfea093ae187e5ac8eff0b4b0ec744925a
parente6f3ae17627e4344da95b13424af5baf4c892b08 (diff)
Core: Movie and State: Add 'L' option to fmt format string to actually use the current locale.
-rw-r--r--Source/Core/Core/Movie.cpp4
-rw-r--r--Source/Core/Core/State.cpp4
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)