diff options
author | Kim Alvefur <zash@zash.se> | 2020-04-22 21:46:56 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-04-22 21:46:56 +0200 |
commit | 95906a0ef4699b745fd5dfbef3729c8041b0e2b4 (patch) | |
tree | 31e31e94cbd3cc27ec99af0ffa7cee699568e4c4 | |
parent | d146b0d68af64e2dc0ba49e29301b2433dae02bf (diff) | |
download | prosody-95906a0ef4699b745fd5dfbef3729c8041b0e2b4.tar.gz prosody-95906a0ef4699b745fd5dfbef3729c8041b0e2b4.zip |
mod_uptime: Encode uptime as decimal, fix #1536 (thanks Martin)
-rw-r--r-- | plugins/mod_uptime.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_uptime.lua b/plugins/mod_uptime.lua index 035f7e9b..8a01fb17 100644 --- a/plugins/mod_uptime.lua +++ b/plugins/mod_uptime.lua @@ -16,7 +16,7 @@ module:add_feature("jabber:iq:last"); module:hook("iq-get/host/jabber:iq:last:query", function(event) local origin, stanza = event.origin, event.stanza; - origin.send(st.reply(stanza):tag("query", {xmlns = "jabber:iq:last", seconds = tostring(os.difftime(os.time(), start_time))})); + origin.send(st.reply(stanza):tag("query", {xmlns = "jabber:iq:last", seconds = tostring(("%d"):format(os.difftime(os.time(), start_time)))})); return true; end); |