# HG changeset patch # User Waqas Hussain # Date 1296258125 -18000 # Node ID c86b68abe12ede81ad9313b61edb741aa6bf2662 # Parent b6d072a3668d7d0e28f3815ddf4153c9761f3508 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). diff -r b6d072a3668d -r c86b68abe12e plugins/mod_ping.lua --- a/plugins/mod_ping.lua Sat Jan 29 04:40:43 2011 +0500 +++ b/plugins/mod_ping.lua Sat Jan 29 04:42:05 2011 +0500 @@ -22,8 +22,10 @@ -- 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