Update common.js

修复恋爱墙倒计时获取本地时间报错。
This commit is contained in:
YangMieMie 2025-02-10 17:07:17 +08:00 committed by GitHub
parent efedc75517
commit fadb8e83d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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')
})
})()
})()