From 9a6ced171ba9a05f3c5840ffcfb4e57fc2e55b70 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Mon, 1 Jul 2024 18:43:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=A8=E5=91=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/clock.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/worldsrv/clock.go b/worldsrv/clock.go index 7bd48d7..63b3ea6 100644 --- a/worldsrv/clock.go +++ b/worldsrv/clock.go @@ -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() }