mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
Reset locale after strftime() call
This commit is contained in:
parent
152f415b9a
commit
1a654fa451
1 changed files with 5 additions and 0 deletions
|
@ -360,12 +360,17 @@ namespace MWGui
|
|||
timeinfo = localtime(&time);
|
||||
|
||||
// Use system/environment locale settings for datetime formatting
|
||||
char* oldLctime = setlocale(LC_TIME, NULL);
|
||||
setlocale(LC_TIME, "");
|
||||
|
||||
const int size=1024;
|
||||
char buffer[size];
|
||||
if (std::strftime(buffer, size, "%x %X", timeinfo) > 0)
|
||||
text << buffer << "\n";
|
||||
|
||||
// reset
|
||||
setlocale(LC_TIME, oldLctime);
|
||||
|
||||
text << "#{sLevel} " << mCurrentSlot->mProfile.mPlayerLevel << "\n";
|
||||
text << "#{sCell=" << mCurrentSlot->mProfile.mPlayerCell << "}\n";
|
||||
|
||||
|
|
Loading…
Reference in a new issue