Core: Movie and State: Add 'L' option to fmt format string to actually use the current locale.

This commit is contained in:
Jordan Woyak 2025-10-13 00:20:33 -05:00
parent 81f620ba97
commit d1d1aae730
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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);