mirror of
https://github.com/monero-project/monero.git
synced 2024-11-17 16:27:39 +00:00
Merge pull request #2054
977c2186
easylogging++: log timestamps in GMT for privacy (moneromooo-monero)
This commit is contained in:
commit
2f724e5849
1 changed files with 3 additions and 3 deletions
6
external/easylogging++/easylogging++.cc
vendored
6
external/easylogging++/easylogging++.cc
vendored
|
@ -1164,19 +1164,19 @@ unsigned long long DateTime::getTimeDifference(const struct timeval& endTime, co
|
||||||
struct ::tm* DateTime::buildTimeInfo(struct timeval* currTime, struct ::tm* timeInfo) {
|
struct ::tm* DateTime::buildTimeInfo(struct timeval* currTime, struct ::tm* timeInfo) {
|
||||||
#if ELPP_OS_UNIX
|
#if ELPP_OS_UNIX
|
||||||
time_t rawTime = currTime->tv_sec;
|
time_t rawTime = currTime->tv_sec;
|
||||||
::localtime_r(&rawTime, timeInfo);
|
::gmtime_r(&rawTime, timeInfo);
|
||||||
return timeInfo;
|
return timeInfo;
|
||||||
#else
|
#else
|
||||||
# if ELPP_COMPILER_MSVC
|
# if ELPP_COMPILER_MSVC
|
||||||
ELPP_UNUSED(currTime);
|
ELPP_UNUSED(currTime);
|
||||||
time_t t;
|
time_t t;
|
||||||
_time64(&t);
|
_time64(&t);
|
||||||
localtime_s(timeInfo, &t);
|
gmtime_s(timeInfo, &t);
|
||||||
return timeInfo;
|
return timeInfo;
|
||||||
# else
|
# else
|
||||||
// For any other compilers that don't have CRT warnings issue e.g, MinGW or TDM GCC- we use different method
|
// For any other compilers that don't have CRT warnings issue e.g, MinGW or TDM GCC- we use different method
|
||||||
time_t rawTime = currTime->tv_sec;
|
time_t rawTime = currTime->tv_sec;
|
||||||
struct tm* tmInf = localtime(&rawTime);
|
struct tm* tmInf = gmtime(&rawTime);
|
||||||
*timeInfo = *tmInf;
|
*timeInfo = *tmInf;
|
||||||
return timeInfo;
|
return timeInfo;
|
||||||
# endif // ELPP_COMPILER_MSVC
|
# endif // ELPP_COMPILER_MSVC
|
||||||
|
|
Loading…
Reference in a new issue