# Set timezone for Docker container

**URL:** https://meta.discourse.org/t/set-timezone-for-docker-container/244190
**Category:** Self-hosting
**Created:** [November 3, 2022, 3:29pm UTC](https://meta.discourse.org/t/set-timezone-for-docker-container/244190 "2022-11-03T15:29:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![OrkoGrayskull](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/orkograyskull/32/275883_2.png) [@OrkoGrayskull](https://meta.discourse.org/u/OrkoGrayskull)
#### Post date: [November 3, 2022, 3:29pm UTC](https://meta.discourse.org/t/set-timezone-for-docker-container/244190/1 "2022-11-03T15:29:06Z")

</div>

I want to set the timezone for the Docker container to `Europe/Paris`, like the host system. So I changed **app.yml** :

```plaintext
run:  
  - replace:       
      filename: "/etc/timezone"     
      from: "Etc/UTC"       
      to: "Europe/Paris"

```

This change works but when I enter `date` in the container, the timezone is still `UTC`.

How can I change the timezone? Any ideas/hints?

---

<div class="post-metadata">

### Author: ![OrkoGrayskull](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/orkograyskull/32/275883_2.png) [@OrkoGrayskull](https://meta.discourse.org/u/OrkoGrayskull)
#### Post date: [November 4, 2022, 8:15am UTC](https://meta.discourse.org/t/set-timezone-for-docker-container/244190/2 "2022-11-04T08:15:24Z")

</div>

Found a solution. Add this to your **app.yml** :

```plaintext
run:
  # set timezone "Europe/Paris"
  # systemd: timedatectl set-timezone 'Europe/Paris'  
  - exec: ln -fs /usr/share/zoneinfo/Europe/Paris /etc/localtime   
  - exec: dpkg-reconfigure --frontend noninteractive tzdata

```

Maybe this helps someone.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [December 4, 2022, 8:15am UTC](https://meta.discourse.org/t/set-timezone-for-docker-container/244190/3 "2022-12-04T08:15:37Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
