From: DeYu Liu Date: Tue, 6 Jul 2021 05:44:20 +0000 (+0800) Subject: luci-base: Fix time display error X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=720a57647bfc43202c72ce0a9a90c2fd72483d84;p=project%2Fluci.git luci-base: Fix time display error Signed-off-by: DeYu Liu (cherry picked from commit 0e4b4c5b42f9d8b93a4936c4b2d63f9a90c5a61b) --- diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js index b66fe684a5..22cbecc864 100644 --- a/modules/luci-base/htdocs/luci-static/resources/cbi.js +++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js @@ -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); }