mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-16 04:09:39 +00:00
Core: Movie and State: Add 'L' option to fmt format string to actually use the current locale.
This commit is contained in:
parent
81f620ba97
commit
d1d1aae730
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user