Changeset

10749:abbdf72b0710

mod_uptime: Encode uptime as decimal, fix #1536 (thanks Martin)
author Kim Alvefur <zash@zash.se>
date Wed, 22 Apr 2020 21:46:56 +0200
parents 10748:93293891709b
children 10750:ff087f2d4cb6
files plugins/mod_uptime.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);