From 52916f36785ab1c65fe6fda263a53de3cf6c359b Mon Sep 17 00:00:00 2001 From: lianghuanjie Date: Wed, 8 Jan 2025 20:37:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BD=AF=E8=B4=A8=E6=8A=BC=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=97=B6=E9=97=B4=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/logic/nft/stake_settle_logic.go | 3 ++- internal/model/nh_system_config_model.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/logic/nft/stake_settle_logic.go b/internal/logic/nft/stake_settle_logic.go index d13a232..1b50b32 100644 --- a/internal/logic/nft/stake_settle_logic.go +++ b/internal/logic/nft/stake_settle_logic.go @@ -29,7 +29,8 @@ func (l *StakeSettleLogic) StakeSettle() { logx.Errorw("get nft stake task open date failed", logx.Field("err", err)) return } - end = end.AddDate(0, 0, 1).Add(-time.Second) + start = start.AddDate(0, 0, 1) + end = end.AddDate(0, 0, 1) now := time.Now() if now.Before(start) || now.After(end) { logx.Infow("now is not in the date range", logx.Field("now", now), logx.Field("start", start), logx.Field("end", end)) diff --git a/internal/model/nh_system_config_model.go b/internal/model/nh_system_config_model.go index dbc34ce..dff8aa2 100755 --- a/internal/model/nh_system_config_model.go +++ b/internal/model/nh_system_config_model.go @@ -74,7 +74,7 @@ func (m *customNhSystemConfigModel) GetNftStakeTaskOpenDate(ctx context.Context) if err != nil { return } - end, err = time.ParseInLocation(time.DateOnly, dateConf.End, time.Local) + end, err = time.ParseInLocation(time.DateTime, dateConf.End+" 23:59:59", time.Local) return }