luci-base: Fix time display error 5172/head
authorDeYu Liu <vito_sam@outlook.com>
Tue, 6 Jul 2021 05:44:20 +0000 (13:44 +0800)
committerDeYu Liu <vito_sam@outlook.com>
Tue, 6 Jul 2021 05:57:54 +0000 (13:57 +0800)
Signed-off-by: DeYu Liu <vito_sam@outlook.com>
modules/luci-base/htdocs/luci-static/resources/cbi.js

index b66fe684a5d16eea48403ee006d6473054f55754..22cbecc864b10f01a9f97f7936b6e13de17affc1 100644 (file)
@@ -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);
                                                }