From 0ce46290aeca32e386961a6c79f04113f59fccd7 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 16 Mar 2007 17:53:53 +0000 Subject: Improve this to show time with and without delta, without the user having to work it out in their head git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6684 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_alltime.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp index 81a3fbf39..3356974c6 100644 --- a/src/modules/m_alltime.cpp +++ b/src/modules/m_alltime.cpp @@ -30,13 +30,16 @@ class cmd_alltime : public command_t CmdResult Handle(const char **parameters, int pcnt, userrec *user) { char fmtdate[64]; - time_t now = ServerInstance->Time(); + char fmtdate2[64]; + time_t now = ServerInstance->Time(false); strftime(fmtdate, sizeof(fmtdate), "%F %T", gmtime(&now)); + now = ServerInstance->Time(true); + strftime(fmtdate2, sizeof(fmtdate2), "%F %T", gmtime(&now)); int delta = ServerInstance->GetTimeDelta(); - string msg = ":" + string(ServerInstance->Config->ServerName) + " NOTICE " + user->nick + " :Time for " + - ServerInstance->Config->ServerName + " is: " + fmtdate + " (delta " + ConvToStr(delta) + " seconds)"; + string msg = ":" + string(ServerInstance->Config->ServerName) + " NOTICE " + user->nick + " :System time for " + + ServerInstance->Config->ServerName + " is: " + fmtdate + " (delta " + ConvToStr(delta) + " seconds): Time with delta: "+ fmtdate2; if (IS_LOCAL(user)) { -- cgit v1.2.3