Closed Fallout476 closed 2 years ago
I cannot replicate this. Please share your full docker run command, and if you are mounting in a custom settings.py, please share that as well.
/bin/docker run \
--rm \
--name=sal \
--hostname=sal \
-p 443:443 -p 8000:8000 \
-v /etc/letsencrypt/live/sal.
is the TZ var during the container startup?
is the TZ var during the container startup?
I don't understand this question.
If you aren't passing in the TZ setting, Django will use the timezone set on the server.
That's what we thought too, TZ on the server is America/Los_Angelos, yet the web page shows BST. There is no where in our environment where the TZ is BST, not the docker host, postgres server, or postgres DB itself
[root@sal-d locale]# docker exec sal date Thu Jun 24 12:25:17 PDT 2021
Hello @vphan13
Perhaps you can experiment with these environment variables, they work for us:
-e TZ="Europe/Madrid" \
-e DOCKER_SAL_TZ="Europe/Madrid" \
Describe the bug using th TZ option in docker does not change the timezone from BST to local or UTC
the timezone is correct on the db
saldb1=# SHOW TIMEZONE; TimeZone
America/Los_Angeles (1 row)
however, this is what is displayed on the front end.
Expected behavior when using the TZ option, the timezone changes to the timezone we desire.
Server (please complete the following information):
Client (please complete the following information):
Additional context Sal refuses to run nginx in DEBUG MODE
from the log sal-d.REDACTED docker[122675]: /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)