diff options
author | Steven Barth <steven@midlink.org> | 2008-08-17 15:15:33 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-08-17 15:15:33 +0000 |
commit | d33e42b53622f606f46e443ff91c34d407cd5605 (patch) | |
tree | a0cc0e7d7b83a8c565e1e687c44c31ca4139bbee | |
parent | c7ba7f99b04178e839f343b4f3e17cf3c18ea75a (diff) |
#108
-rw-r--r-- | modules/admin-core/luasrc/tools/webadmin.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/admin-core/luasrc/tools/webadmin.lua b/modules/admin-core/luasrc/tools/webadmin.lua index 7f123ec4d..1e3d9e002 100644 --- a/modules/admin-core/luasrc/tools/webadmin.lua +++ b/modules/admin-core/luasrc/tools/webadmin.lua @@ -35,7 +35,7 @@ function date_format(secs) local hour = 0 local days = 0 - secs = math.floor(tonumber(secs)) + secs = math.floor(secs) if secs > 60 then mins = math.floor(secs / 60) secs = secs % 60 @@ -52,9 +52,9 @@ function date_format(secs) end if days > 0 then - return string.format("%dd %02dh %02dmin %02ds", days, hour, mins, secs) + return string.format("%.0fd %02.0fh %02.0fmin %02.0fs", days, hour, mins, secs) else - return string.format("%02dh %02dmin %02ds", hour, mins, secs) + return string.format("%02.0fh %02.0fmin %02.0fs", hour, mins, secs) end end |