mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +00:00
Savegame dialog: use locale-aware datetime format
This commit is contained in:
parent
53ba23e303
commit
ecfaa41e93
@ -241,7 +241,13 @@ namespace MWGui
|
||||
struct tm* timeinfo;
|
||||
timeinfo = localtime(&time);
|
||||
|
||||
text << asctime(timeinfo) << "\n";
|
||||
// Use system/environment locale settings for datetime formatting
|
||||
std::setlocale(LC_TIME, "");
|
||||
|
||||
const int size=1024;
|
||||
char buffer[size];
|
||||
if (std::strftime(buffer, size, "%x %X", timeinfo) > 0)
|
||||
text << buffer << "\n";
|
||||
text << "Level " << slot->mProfile.mPlayerLevel << "\n";
|
||||
text << slot->mProfile.mPlayerCell << "\n";
|
||||
// text << "Time played: " << slot->mProfile.mTimePlayed << "\n";
|
||||
|
Loading…
Reference in New Issue
Block a user