aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-04-22 21:46:56 +0200
committerKim Alvefur <zash@zash.se>2020-04-22 21:46:56 +0200
commitbc0e389d47b0a40e1ea871fe4ff583746af928be (patch)
tree31e31e94cbd3cc27ec99af0ffa7cee699568e4c4 /plugins
parent701c5f48110cb004925ba659b7221b18713ad2c7 (diff)
downloadprosody-bc0e389d47b0a40e1ea871fe4ff583746af928be.tar.gz
prosody-bc0e389d47b0a40e1ea871fe4ff583746af928be.zip
mod_uptime: Encode uptime as decimal, fix #1536 (thanks Martin)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_uptime.lua2
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);