From b1246844b01be5923d357862f97bc9f513c3abfc Mon Sep 17 00:00:00 2001 From: MKStoler1024 <158786854+MKStoler1024@users.noreply.github.com> Date: Thu, 16 Jan 2025 01:39:43 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=80=92=E8=AE=A1?= =?UTF-8?q?=E6=97=B6=E8=AE=A1=E7=AE=97=E4=B8=AD=E7=9A=84=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=81=8F=E5=B7=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exam/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exam/script.js b/exam/script.js index 585a544..83ee812 100644 --- a/exam/script.js +++ b/exam/script.js @@ -74,7 +74,7 @@ document.addEventListener("DOMContentLoaded", () => { if (currentExam) { currentSubjectElem.textContent = `当前科目: ${currentExam.name}`; examTimingElem.textContent = `起止时间: ${formatTimeWithoutSeconds(new Date(currentExam.start).toLocaleTimeString('zh-CN', { hour12: false }))} - ${formatTimeWithoutSeconds(new Date(currentExam.end).toLocaleTimeString('zh-CN', { hour12: false }))}`; - const remainingTime = (new Date(currentExam.end).getTime() - now.getTime()) / 1000; + const remainingTime = (new Date(currentExam.end).getTime() - now.getTime() + 1000) / 1000; const remainingHours = Math.floor(remainingTime / 3600); const remainingMinutes = Math.floor((remainingTime % 3600) / 60); const remainingSeconds = Math.floor(remainingTime % 60);