aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_ping.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_ping.lua')
-rw-r--r--plugins/mod_ping.lua4
1 files changed, 3 insertions, 1 deletions
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