diff options
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r-- | src/helperfuncs.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 9ad481bb8..71fb71cdf 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -403,14 +403,14 @@ const char* InspIRCd::Format(const char* formatString, ...) return ret; } -std::string InspIRCd::TimeString(time_t curtime, const char* format) +std::string InspIRCd::TimeString(time_t curtime, const char* format, bool utc) { #ifdef _WIN32 if (curtime < 0) curtime = 0; #endif - struct tm* timeinfo = localtime(&curtime); + struct tm* timeinfo = utc ? gmtime(&curtime) : localtime(&curtime); if (!timeinfo) { curtime = 0; |