diff --git a/_const/rediskey/key_func.go b/_const/rediskey/key_func.go index e4cd76324615ef8a25f6fdfb6984c9988242bbec..8207ffae831ee6d8fc4b27620038f3e1556ce53a 100644 --- a/_const/rediskey/key_func.go +++ b/_const/rediskey/key_func.go @@ -6,7 +6,7 @@ import ( "time" ) -func GetSlotFruitDailyTimes(userId uint64) string { +func GetSlotFruitDailyTimes(userId uint64, nowTime time.Time) string { var cstZone = time.FixedZone("CST", 3*3600) // 东三区,沙特时间 - return fmt.Sprintf(SlotFruitWeeklyDailyTask, time.Now().In(cstZone).Format(utils.DATE_FORMAT), userId) + return fmt.Sprintf(SlotFruitWeeklyDailyTask, nowTime.In(cstZone).Format(utils.DATE_FORMAT), userId) }