#include "inspircd.h"
-/* $ModDesc: Display timestamps from all servers connected to the network */
-
class CommandAlltime : public Command
{
public:
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;
{
}
- void init() CXX11_OVERRIDE
- {
- ServerInstance->Modules->AddService(mycommand);
- }
-
Version GetVersion() CXX11_OVERRIDE
{
return Version("Display timestamps from all servers connected to the network", VF_OPTCOMMON | VF_VENDOR);