fix 修复cron问题

This commit is contained in:
timerzz 2024-09-13 23:09:21 +08:00
parent f0a601466b
commit 05a5debf3c

View File

@ -16,9 +16,8 @@ type Cron struct {
func NewCron() *Cron {
now := time.Now()
l, _ := time.LoadLocation("Asia/Shanghai")
c := &Cron{
time: time.Date(now.Year(), now.Month(), now.Day(), 01, 0, 0, 0, l),
time: time.Date(now.Year(), now.Month(), now.Day(), 01, 0, 0, 0, now.Location()),
}
return c
}