Closed KiboMibo closed 2 years ago
cronTime := "0 30 21 * * ?" ct, err := quartz.NewCronTrigger(cronTime) if err != nil { return err } currentTime := time.Now().UnixNano() fmt.Println("CurrentTime:", time.Unix(currentTime/int64(time.Second), 0).String()) nft, err := ct.NextFireTime(currentTime) if err != nil { return err } fmt.Println("NextFireTime:", time.Unix(nft/int64(time.Second), 0).String())
Result:
CurrentTime: 2022-03-23 09:09:25 +0300 MSK NextFireTime: 2022-03-24 00:30:00 +0300 MSK
Looks like cron trigger set job time in UTC. Is there some option to set job in local time?
Result:
Looks like cron trigger set job time in UTC. Is there some option to set job in local time?