aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-06-02 16:40:23 +0200
committerKim Alvefur <zash@zash.se>2020-06-02 16:40:23 +0200
commit753836c876d5060cbc7e0c2029597abaae844eed (patch)
treeeb8766a15a2181d96ae169f2083c2fb3718929e3 /plugins
parent6264bd48c14ae1d1ba5f22d90abf3c9842279f9c (diff)
downloadprosody-753836c876d5060cbc7e0c2029597abaae844eed.tar.gz
prosody-753836c876d5060cbc7e0c2029597abaae844eed.zip
mod_admin_shell: Fix error due to float passed to os.date in Lua 5.3
Thanks Martin
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_admin_shell.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua
index a9ca797c..fd88f59c 100644
--- a/plugins/mod_admin_shell.lua
+++ b/plugins/mod_admin_shell.lua
@@ -1273,11 +1273,11 @@ function def_env.debug:timers()
print("-- util.timer");
for i, id in ipairs(h.ids) do
if not params[id] then
- print(os.date("%F %T", h.priorities[i]), h.items[id]);
+ print(os.date("%F %T", math.floor(h.priorities[i])), h.items[id]);
elseif not params[id].callback then
- print(os.date("%F %T", h.priorities[i]), h.items[id], unpack(params[id]));
+ print(os.date("%F %T", math.floor(h.priorities[i])), h.items[id], unpack(params[id]));
else
- print(os.date("%F %T", h.priorities[i]), params[id].callback, unpack(params[id]));
+ print(os.date("%F %T", math.floor(h.priorities[i])), params[id].callback, unpack(params[id]));
end
end
end
@@ -1293,7 +1293,7 @@ function def_env.debug:timers()
if h then
local next_time = h:peek();
if next_time then
- return true, os.date("Next event at %F %T (in %%.6fs)", next_time):format(next_time - time.now());
+ return true, os.date("Next event at %F %T (in %%.6fs)", math.floor(next_time)):format(next_time - time.now());
end
end
return true;