Timezone not added to schedule in runner.go
@@ -93,8 +93,13 @@ func (a *cronJobsRunner) AddSchedule(source *v1beta2.PingSource) cron.EntryID {
ResourceGroup: resourceGroup,
}
+ schedule := source.Spec.Schedule
+ if source.Spec.Timezone != "" {
+ schedule = "CRON_TZ=" + source.Spec.Timezone + " " + schedule
+ }
+
ctx = kncloudevents.ContextWithMetricTag(ctx, metricTag)
- id, _ := a.cron.AddFunc(source.Spec.Schedule, a.cronTick(ctx, event))
+ id, _ := a.cron.AddFunc(schedule, a.cronTick(ctx, event))
return id
}
