diff options
Diffstat (limited to 'src/modules/m_alltime.cpp')
-rw-r--r-- | src/modules/m_alltime.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp index 58f7c4fb5..73c0fa994 100644 --- a/src/modules/m_alltime.cpp +++ b/src/modules/m_alltime.cpp @@ -31,13 +31,11 @@ class CommandAlltime : public Command CmdResult Handle(const std::vector<std::string> ¶meters, User *user) { - char fmtdate[64]; - time_t now = ServerInstance->Time(); - strftime(fmtdate, sizeof(fmtdate), "%Y-%m-%d %H:%M:%S", gmtime(&now)); + const std::string fmtdate = InspIRCd::TimeString(ServerInstance->Time(), "%Y-%m-%d %H:%M:%S", true); - std::string msg = ":" + ServerInstance->Config->ServerName + " NOTICE " + user->nick + " :System time is " + fmtdate + " (" + ConvToStr(ServerInstance->Time()) + ") on " + ServerInstance->Config->ServerName; + std::string msg = "System time is " + fmtdate + " (" + ConvToStr(ServerInstance->Time()) + ") on " + ServerInstance->Config->ServerName; - user->SendText(msg); + user->WriteRemoteNotice(msg); /* we want this routed out! */ return CMD_SUCCESS; |