跨周问题

This commit is contained in:
sk 2024-07-01 18:43:00 +08:00
parent b067f07b2c
commit 9a6ced171b
1 changed files with 4 additions and 3 deletions

View File

@ -3,6 +3,7 @@ package main
import (
"time"
"mongo.games.com/game/common"
"mongo.games.com/goserver/core/module"
)
@ -114,9 +115,9 @@ func (this *ClockMgr) Update() {
this.LastDay = day
this.fireDayEvent()
_, week := tNow.ISOWeek()
if week != this.LastWeek {
this.LastWeek = week
week := common.GetWeekStartTs(tNow.Unix())
if week != int64(this.LastWeek) {
this.LastWeek = int(week)
this.fireWeekEvent()
}