# Time clarification

**URL:** <https://forums.docker.com/t/time-clarification/78526>\
**Category:** General\
**Created:** [July 23, 2019, 3:28pm UTC](https://forums.docker.com/t/time-clarification/78526 "2019-07-23T15:28:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcandre](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/mcandre/32/1058_2.png) [@mcandre](https://forums.docker.com/u/mcandre)\
**Post date:** [July 23, 2019, 3:28pm UTC](https://forums.docker.com/t/time-clarification/78526/1 "2019-07-23T15:28:11Z")

</div>

Hi, I want to make sure that I understand how timezones work with Docker. Is it correct to say that configuring environment variable `TZ=<locale>`, such as `TZ=UTC`, is sufficient to apply a consistent timezone across the entire container, including any child processes and subsystems?

Does `TZ` work for:

- Dockerfile’s?
- docker run?
- docker-compose?
- Kubernetes?
- Vagrant?
- LXC, LXD?

Does this same process work for Windows images such as the Microsoft nano images? BSD containers?

Is there a special locale value for indicating that a container should match the host’s timezone? Or would that have to be manually applied?

How do OS-less containers behave, such as `FROM scratch` containers with statically linked binaries? Correct to say that those would match the host’s timezone by default, and that `TZ=<locale>` is sufficient to configure timezones for these kinds of containers as well?

Could we document the recommended procedure for customizing timezone in the main Docker manual? So far, I’ve only found scattered posts around Stack Overflow and Medium.

Do the library/ namespace images have consistent timezone behavior? E.g., are they all set to UTC, or perhaps EST, or perhaps all match the host timezone?

---

<div class="post-metadata">

**Author:** ![meyay](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/meyay/32/34000_2.png) [@meyay](https://forums.docker.com/u/meyay)\
**Post date:** [July 23, 2019, 8:22pm UTC](https://forums.docker.com/t/time-clarification/78526/2 "2019-07-23T20:22:20Z")

</div>

What gives you the impression that updating the timezone by setting the TZ environment variable is a docker feature?

Actualy the os package `tzdata` needs to be installed in the image and an entrypoint script needs to take care of using the TZ variable to update the time zome configuration inside a running container.

I would be surprised if tzdata is available for windows as well.
