summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2014-06-13 00:09:34 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-06-25 14:41:01 +0200
commit1cf85908164d97dfa385c75b9f817905a8a75e78 (patch)
treedd6598cebcf92d2d78304046960cf3d85ee78e72 /src/helperfuncs.cpp
parentda9adf9e29a1e7e0f914b494972013d0c0c35672 (diff)
Add parameter to InspIRCd::TimeString for UTC time formats.
Missing doc added by @attilamolnar
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp4
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;