Skip to main content

How do I set the timezones in Docker images?

Default timezone in Docker containers

By default, Docker containers are using UTC timezone. However, there might be instances where you need to change the container's timezone.

Setting the timezone for your Docker container

You can set the timezone in your Docker image by adding a TZ environment variable to your configuration.

version:2.1
jobs:
build:
docker:
- image: your/primary-image:version-tag
auth:
username: mydockerhub-user
password: $DOCKERHUB_PASSWORD
environment:
TZ:"America/Los_Angeles"

You can a full list of available timezone options here.

Additional Resources:

Did this answer your question?