From fadb8e83d497d9f654bd329a6391e7821acf702b Mon Sep 17 00:00:00 2001 From: YangMieMie <69512631+YangMieMie0326@users.noreply.github.com> Date: Mon, 10 Feb 2025 17:07:17 +0800 Subject: [PATCH] Update common.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复恋爱墙倒计时获取本地时间报错。 --- src/js/common.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/common.js b/src/js/common.js index 285a5e8..66ce7e4 100644 --- a/src/js/common.js +++ b/src/js/common.js @@ -390,7 +390,7 @@ const commonContext = { } const grt = new Date(loveTime) setInterval(function () { - let now = Date.now() + let now = new Date(Date.now()) let difference = parseInt((now - grt) / 1000) let seconds = difference % 60 difference = parseInt(difference / 60) @@ -654,4 +654,4 @@ let timeLifeHour = -1 omits.forEach((c) => commonContext[c] && commonContext[c]()) $('html').addClass('ready') }) -})() \ No newline at end of file +})()