Closed kieran-github closed 3 weeks ago
Unfortunately Kubernetes does not support timezones at this time in CronJobs. However, Kubernetes 1.24 will be adding a timezone field in cron jobs, at which time you will be able to specify the timezone (https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.24.md).
Hello,
I had some questions regarding setting the time zone for running our cronjobs as we have some that are time-sensitive and are subject to daylight savings changes. For example, if we wish to run a cronjob at 8:30AM everyday, depending on whether it's EST or EDT we will need to adjust the schedule by one hour as kubernetes runs on UTC0 which doesn't account for such thing.
I had tried to change the alpine containers timezone to EST using tzdata, and the associated schedules to EST / EDT. This works - however, the cronjobs still run at UTC time even though the container are in EST.
Does this mean the kubernetes cron controller (or whatever kicks off the cronjobs from the kubernetes level) is starting the crons in their UTC timezone regardless of container timezone?