Software /
code /
prosody
Changeset
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 |
parents | 4128:b6d072a3668d |
children | 4130:c3508071af47 |
files | plugins/mod_ping.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
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