跨周问题
This commit is contained in:
parent
b067f07b2c
commit
9a6ced171b
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue