Savegame dialog: use locale-aware datetime format

actorid
scrawl 11 years ago
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…
Cancel
Save