luci-base: Fix time display error
Signed-off-by: DeYu Liu <vito_sam@outlook.com>
This commit is contained in:
parent
cef330a1c8
commit
0e4b4c5b42
1 changed files with 3 additions and 3 deletions
|
@ -614,17 +614,17 @@ String.prototype.format = function()
|
|||
var tm = 0;
|
||||
var ts = (param || 0);
|
||||
|
||||
if (ts > 60) {
|
||||
if (ts > 59) {
|
||||
tm = Math.floor(ts / 60);
|
||||
ts = (ts % 60);
|
||||
}
|
||||
|
||||
if (tm > 60) {
|
||||
if (tm > 59) {
|
||||
th = Math.floor(tm / 60);
|
||||
tm = (tm % 60);
|
||||
}
|
||||
|
||||
if (th > 24) {
|
||||
if (th > 23) {
|
||||
td = Math.floor(th / 24);
|
||||
th = (th % 24);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue