跨周问题
This commit is contained in:
parent
b067f07b2c
commit
9a6ced171b
|
|
@ -3,6 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"mongo.games.com/game/common"
|
||||||
"mongo.games.com/goserver/core/module"
|
"mongo.games.com/goserver/core/module"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -114,9 +115,9 @@ func (this *ClockMgr) Update() {
|
||||||
this.LastDay = day
|
this.LastDay = day
|
||||||
this.fireDayEvent()
|
this.fireDayEvent()
|
||||||
|
|
||||||
_, week := tNow.ISOWeek()
|
week := common.GetWeekStartTs(tNow.Unix())
|
||||||
if week != this.LastWeek {
|
if week != int64(this.LastWeek) {
|
||||||
this.LastWeek = week
|
this.LastWeek = int(week)
|
||||||
this.fireWeekEvent()
|
this.fireWeekEvent()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue