From 00da10fa55e309a8376cacbcf85d4ed0b0ef06b0 Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Tue, 4 Dec 2018 11:42:55 +0800 Subject: [PATCH] js: fix formatTime Signed-off-by: Jianhui Zhao --- html/src/views/Rtty.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/html/src/views/Rtty.vue b/html/src/views/Rtty.vue index 7ad6068..0b3cdb6 100644 --- a/html/src/views/Rtty.vue +++ b/html/src/views/Rtty.vue @@ -66,17 +66,17 @@ export default { let th = 0; let tm = 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); } @@ -345,4 +345,4 @@ export default { .terminal { height: 100%; } - \ No newline at end of file +