feat(孟加拉革命日): 倒计时调整为孟加拉的早上6点
This commit is contained in:
parent
6f11e65cb1
commit
6bc3aa5d2b
@ -635,7 +635,7 @@ const closedPopup = () => {
|
||||
historyShow.value = false
|
||||
}
|
||||
|
||||
// 获取沙特下周一早上六点的时间戳
|
||||
// 获取孟加拉下周一早上六点的时间戳
|
||||
const getNextMondayInSaudi = () => {
|
||||
const now = new Date()
|
||||
const utcDay = now.getUTCDay() //获取UTC星期几,0(周日)-6(周六)
|
||||
@ -645,7 +645,7 @@ const getNextMondayInSaudi = () => {
|
||||
const nextMondayUTC = new Date(now) //以当前UTC时间为基准,而不是重新获取
|
||||
|
||||
nextMondayUTC.setUTCDate(now.getUTCDate() + daysToAdd) //增加到下周一那天
|
||||
nextMondayUTC.setUTCHours(3, 0, 0, 0) // 设置为沙特下周一当天早上6点(北京时间3点)
|
||||
nextMondayUTC.setUTCHours(0, 0, 0, 0) // 设置为孟加拉下周一当天早上6点(北京时间3点)
|
||||
return nextMondayUTC.getTime() //得到下周一00:00:00.000的时间戳
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user