Skip to content

Commit

Permalink
scheduler/trigger: cron, use UTC timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatczuk committed Dec 27, 2021
1 parent 7245b67 commit b2c5239
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/scheduler/trigger/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

var cronParser = cron.NewParser(cron.SecondOptional | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor)

// NewCron returns a cron Trigger for a given spec.
// NewCron returns a cron Trigger for a given spec in UTC timezone.
func NewCron(spec string) (scheduler.Trigger, error) {
return cronParser.Parse(spec)
return cronParser.Parse("TZ=UTC " + spec)
}

0 comments on commit b2c5239

Please sign in to comment.