# HG changeset patch # User Kim Alvefur # Date 1587584816 -7200 # Node ID abbdf72b0710abc17c07d3c90c9e8bb9d1cb365b # Parent 93293891709b178e330c407d8c95632c91c84714 mod_uptime: Encode uptime as decimal, fix #1536 (thanks Martin) diff -r 93293891709b -r abbdf72b0710 plugins/mod_uptime.lua --- a/plugins/mod_uptime.lua Wed Apr 22 21:38:36 2020 +0200 +++ b/plugins/mod_uptime.lua Wed Apr 22 21:46:56 2020 +0200 @@ -16,7 +16,7 @@ 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);