From bd95b3ba7be4490956e242753869d969f08504c6 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sat, 29 Jan 2011 04:42:05 +0500 Subject: mod_ping: Use util.datetime to generate timestamp in ad-hoc command response (instead of the current use of os.date, which doesn't take timezone into account). --- plugins/mod_ping.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/mod_ping.lua b/plugins/mod_ping.lua index c0ba6189..0bfcac66 100644 --- a/plugins/mod_ping.lua +++ b/plugins/mod_ping.lua @@ -22,8 +22,10 @@ module:hook("iq/host/urn:xmpp:ping:ping", ping_handler); -- Ad-hoc command +local datetime = require "util.datetime".datetime; + function ping_command_handler (self, data, state) - local now = os.date("%Y-%m-%dT%X"); + local now = datetime(); return { info = "Pong\n"..now, status = "completed" }; end -- cgit v1.2.3