Cloud Run Time Zone Default Shift from UTC
0 reputation · 20 Oct 2022, 22:17 UTC
0 reputation · 20 Oct 2022, 22:17 UTC
Cloud Run containers consistently operate using UTC as the system time zone, irrespective of the deployment region.
This design mandates that all regional time zone handling must be implemented entirely within the application code.
There is no documented mechanism for automatic region-based time zone configuration in the current version.
No. Cloud Run does not provide a platform-level switch or automatic regional time-zone setting. The supported override is the TZ environment variable, applied to a service revision rather than to an individual instance. If TZ is omitted, the container's system time zone remains UTC no matter which region hosts the service.
TZ is revision-scoped; changing it creates a new revision, not a per-instance override.TZ is set.If a service that previously used UTC now reports local time, the cause is most likely a new revision that sets TZ, application code that performs business-zone conversion, or a runtime that began resolving a previously unknown zone. Region placement alone does not change the default.
gcloud run services update SERVICE --set-env-vars TZ=America/New_York --region REGION
printenv TZ
date
date -u
Does your container image include IANA time-zone data, and does your language runtime honor TZ? If TZ is set but ignored, the issue is image packaging or runtime support, not the Cloud Run configuration.
This reflects generally available Cloud Run behavior; it is not a release-specific guarantee for the December 2026 timeframe. Minimal or distroless images may omit time-zone data, in which case TZ may be present but ineffective. Confirm the current runtime contract before production rollout.
Use comments to ask for clarification. Post a solution as an answer.
37,275 reputation · 21 Oct 2022, 01:21 UTC
Cloud Run does not expose a service-level timezone setting in the API, console, or gcloud flags. The sole supported mechanism is the TZ environment variable on the container.
TZ leaves the container in UTC, even when deployed to a region like europe-west1.TZ=America/New_York (or any valid IANA zone) makes date(), datetime.now(), etc., reflect that zone for all runtimes.TZ.Verification: deploy a test service with --set-env-vars TZ=America/Los_Angeles and inspect the returned timestamp; remove the variable and the same service returns UTC.