summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2014-05-02 16:39:40 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-06-25 14:31:25 +0200
commitda9adf9e29a1e7e0f914b494972013d0c0c35672 (patch)
treeb60b2cf59602a93b7a3c550ca6c39c38c0b888fe /include
parentd2760311db1446951b6a3894f7dc1f6a8f3ee931 (diff)
Add formatting to InspIRCd::TimeString; switch all code to use it.
m_httpd also now uses the correct timestamp format. Windows-specific fixes by @attilamolnar, original PR #849
Diffstat (limited to 'include')
-rw-r--r--include/inspircd.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index 0f6a411a3..1b1543e28 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -662,8 +662,11 @@ class CoreExport InspIRCd
void Cleanup();
/** Return a time_t as a human-readable string.
+ * @param format The format to retrieve the date/time in. See `man 3 strftime`
+ * for more information. If NULL, "%a %b %d %T %Y" is assumed.
+ * @return A string representing the given date/time.
*/
- static std::string TimeString(time_t curtime);
+ static std::string TimeString(time_t curtime, const char* format = NULL);
/** Begin execution of the server.
* NOTE: this function NEVER returns. Internally,