mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 16:43:47 +00:00
feat(Core/Time): Implement saparated manager for game time (#8630)
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
#include "Log.h"
|
||||
#include "LogMessage.h"
|
||||
#include "StringConvert.h"
|
||||
#include "Util.h"
|
||||
#include "Timer.h"
|
||||
#include <algorithm>
|
||||
|
||||
AppenderFile::AppenderFile(uint8 id, std::string const& name, LogLevel level, AppenderFlags flags, std::vector<std::string_view> const& args) :
|
||||
@@ -127,7 +127,7 @@ FILE* AppenderFile::OpenFile(std::string const& filename, std::string const& mod
|
||||
CloseFile();
|
||||
std::string newName(fullName);
|
||||
newName.push_back('.');
|
||||
newName.append(LogMessage::getTimeStr(time(nullptr)));
|
||||
newName.append(LogMessage::getTimeStr(GetEpochTime()));
|
||||
std::replace(newName.begin(), newName.end(), ':', '-');
|
||||
rename(fullName.c_str(), newName.c_str()); // no error handling... if we couldn't make a backup, just ignore
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user