summaryrefslogtreecommitdiff
path: root/src/coremods
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 /src/coremods
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 'src/coremods')
-rw-r--r--src/coremods/core_info/cmd_time.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/coremods/core_info/cmd_time.cpp b/src/coremods/core_info/cmd_time.cpp
index 6a10dc327..95cfb12fd 100644
--- a/src/coremods/core_info/cmd_time.cpp
+++ b/src/coremods/core_info/cmd_time.cpp
@@ -32,12 +32,8 @@ CmdResult CommandTime::Handle (const std::vector<std::string>& parameters, User
if (parameters.size() > 0 && parameters[0] != ServerInstance->Config->ServerName)
return CMD_SUCCESS;
- time_t local = ServerInstance->Time();
- struct tm* timeinfo = localtime(&local);
- const std::string& humanTime = asctime(timeinfo);
-
user->SendText(":%s %03d %s %s :%s", ServerInstance->Config->ServerName.c_str(), RPL_TIME, user->nick.c_str(),
- ServerInstance->Config->ServerName.c_str(), humanTime.c_str());
+ ServerInstance->Config->ServerName.c_str(), InspIRCd::TimeString(ServerInstance->Time()).c_str());
return CMD_SUCCESS;
}