Software /
code /
prosody
Diff
plugins/mod_ping.lua @ 4129:c86b68abe12e
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).
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 29 Jan 2011 04:42:05 +0500 |
parent | 3486:8a46bb70016f |
child | 5776:bd0ff8ae98a8 |
line wrap: on
line diff
--- 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