From da9adf9e29a1e7e0f914b494972013d0c0c35672 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Fri, 2 May 2014 16:39:40 +0100 Subject: 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 --- src/coremods/core_info/cmd_time.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/coremods') 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& 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; } -- cgit v1.2.3