Time zone doesn't reflect environment variable in Docker #1190

Closed
opened 2025-10-09 17:07:12 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @HawaiianPizza on GitHub.

Subject of the issue

Time zone doesn't reflect what is stated in the environment variable.

Deployment environment

  • vaultwarden version: 1.24.0
  • Install method: Docker image

  • Clients used: Web vault, Android

Steps to reproduce

  1. Inside docker-compose.yml, set the environment variable to:
environment:
      - TZ="America/Toronto"
  1. Go to the Admin panel.
  2. Go to Users.
  3. Created at and Last active are only in UTC.

Expected behaviour

Time zone is expected to display in the specified time zone in the docker-compose file.

Actual behaviour

Time zone in docker-compose file is ignored and instead Vaultwarden uses UTC.

Originally created by @HawaiianPizza on GitHub. ### Subject of the issue Time zone doesn't reflect what is stated in the environment variable. ### Deployment environment <!-- The version number, obtained from the logs (at startup) or the admin diagnostics page --> <!-- This is NOT the version number shown on the web vault, which is versioned separately from vaultwarden --> <!-- Remember to check if your issue exists on the latest version first! --> * vaultwarden version: 1.24.0 <!-- How the server was installed: Docker image, OS package, built from source, etc. --> * Install method: Docker image * Clients used: Web vault, Android<!-- web vault, desktop, Android, iOS, etc. (if applicable) --> ### Steps to reproduce <!-- Tell us how to reproduce this issue. What parameters did you set (differently from the defaults) and how did you start vaultwarden? --> 1. Inside docker-compose.yml, set the environment variable to: ``` environment: - TZ="America/Toronto" ``` 2. Go to the Admin panel. 3. Go to Users. 4. `Created at` and `Last active` are only in UTC. ### Expected behaviour <!-- Tell us what you expected to happen --> Time zone is expected to display in the specified time zone in the docker-compose file. ### Actual behaviour <!-- Tell us what actually happened --> Time zone in docker-compose file is ignored and instead Vaultwarden uses UTC.
Author
Owner

@BlackDex commented on GitHub:

Works for me.
Within docker-compose.yml you need to remove the quotes " around the value.

@BlackDex commented on GitHub: Works for me. Within `docker-compose.yml` you need to remove the quotes `"` around the value.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#1190