Use and propagate microsecond-precision timestamps to FormatTime

This enables sub-second precision timestamp formatting for logs and
clients without server-time.
This commit is contained in:
Vladimir Panteleev
2017-10-24 21:45:44 +00:00
parent 901a21e91b
commit 03c4c0b165
6 changed files with 21 additions and 10 deletions
+2 -2
View File
@@ -271,9 +271,9 @@ void CLogMod::PutLog(const CString& sLine,
}
CString sPath;
time_t curtime;
timeval curtime;
time(&curtime);
gettimeofday(&curtime, nullptr);
// Generate file name
sPath = CUtils::FormatTime(curtime, m_sLogPath, GetUser()->GetTimezone());
if (sPath.empty()) {