projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7ba7f9
)
#108
author
Steven Barth
<steven@midlink.org>
Sun, 17 Aug 2008 15:15:33 +0000
(15:15 +0000)
committer
Steven Barth
<steven@midlink.org>
Sun, 17 Aug 2008 15:15:33 +0000
(15:15 +0000)
modules/admin-core/luasrc/tools/webadmin.lua
patch
|
blob
|
history
diff --git
a/modules/admin-core/luasrc/tools/webadmin.lua
b/modules/admin-core/luasrc/tools/webadmin.lua
index 7f123ec4d16deba14758baeded61c64d4fef82af..1e3d9e002a089e2e66e1e1ce739031af99b91fa5 100644
(file)
--- 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 %02d
s", days, hour, mins, secs)
+ return string.format("%
.0fd %02.0fh %02.0fmin %02.0f
s", days, hour, mins, secs)
else
- return string.format("%02
dh %02dmin %02d
s", hour, mins, secs)
+ return string.format("%02
.0fh %02.0fmin %02.0f
s", hour, mins, secs)
end
end