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 }