Skip to content

Commit 6dcaacb

Browse files
cjc7373Tim Bannister
andauthored
make the time zone warning explicit
Co-authored-by: Tim Bannister <[email protected]>
1 parent 9b1ba9c commit 6dcaacb

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

content/en/docs/concepts/workloads/controllers/cron-jobs.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,15 @@ When you have the feature enabled, you can set `.spec.timeZone` to the name of a
162162
`.spec.timeZone: "Etc/UTC"` instructs Kubernetes to interpret the schedule relative to Coordinated Universal Time.
163163

164164
{{< caution >}}
165-
Historically you may set the `.spec.schedule` field to a timezone like `CRON_TZ=UTC * * * * *` or
166-
`TZ=UTC * * * * *`. This way is not recommended any more and you should consider use the
167-
`.spec.timeZone` field as described above.
165+
The implementation of the CronJob API in Kubernetes {{< skew currentVersion >}} lets you set
166+
the `.spec.schedule` field to include a timezone; for example: `CRON_TZ=UTC * * * * *`
167+
or `TZ=UTC * * * * *`.
168+
169+
Specifying a timezone that way is **not officially supported** (and never has been).
170+
171+
If you try to set a schedule that includes `TZ` or `CRON_TZ` timezone specification,
172+
Kubernetes reports a [warning](/blog/2020/09/03/warnings/) to the client.
173+
Future versions of Kubernetes might not implement that unofficial timezone mechanism at all.
168174
{{< /caution >}}
169175

170176
A time zone database from the Go standard library is included in the binaries and used as a fallback in case an external database is not available on the system.

0 commit comments

Comments
 (0)