diff --git a/CHANGELOG.md b/CHANGELOG.md index b344438094..7153534764 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -197,6 +197,7 @@ Feature #3980: In-game option to disable controller Feature #3999: Shift + Double Click should maximize/restore menu size Feature #4001: Toggle sneak controller shortcut + Feature #4129: Beta Comment to File Feature #4209: Editor: Faction rank sub-table Feature #4255: Handle broken RepairedOnMe script function Feature #4316: Implement RaiseRank/LowerRank functions properly diff --git a/apps/openmw/mwgui/savegamedialog.cpp b/apps/openmw/mwgui/savegamedialog.cpp index e9fb2a9642..f85bfc8d37 100644 --- a/apps/openmw/mwgui/savegamedialog.cpp +++ b/apps/openmw/mwgui/savegamedialog.cpp @@ -400,17 +400,7 @@ namespace MWGui struct tm* timeinfo; timeinfo = localtime(&time); - // Use system/environment locale settings for datetime formatting - char* oldLctime = setlocale(LC_TIME, nullptr); - 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 << std::put_time(timeinfo, "%Y.%m.%d %T") << "\n"; text << "#{sLevel} " << mCurrentSlot->mProfile.mPlayerLevel << "\n"; text << "#{sCell=" << mCurrentSlot->mProfile.mPlayerCell << "}\n"; diff --git a/apps/openmw/mwscript/miscextensions.cpp b/apps/openmw/mwscript/miscextensions.cpp index d40ad769d6..8be3945a9c 100644 --- a/apps/openmw/mwscript/miscextensions.cpp +++ b/apps/openmw/mwscript/miscextensions.cpp @@ -1,10 +1,13 @@ #include "miscextensions.hpp" #include +#include #include #include +#include + #include #include #include @@ -1222,6 +1225,11 @@ namespace MWScript std::stringstream msg; + msg << "Report time: "; + + std::time_t currentTime = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); + msg << std::put_time(std::gmtime(¤tTime), "%Y.%m.%d %T UTC") << std::endl; + msg << "Content file: "; if (!ptr.getCellRef().hasContentFile()) @@ -1263,6 +1271,8 @@ namespace MWScript --arg0; } + Log(Debug::Warning) << "\n" << msg.str(); + runtime.getContext().report(msg.str()); } };