Reputation: 4154
I am developing an app in Django and I have pushed it on Heroku. It returns the current time when the user do certain things.
In local, there is no problem. On Heroku, there is a two hours difference with respect to my timezone datetime (Berlin/Europe)
I have set Heroku timezone as "Europe/Berlin" by typing in my command prompt:
heroku config:add TZ="Europe/Berlin"
heroku config:set TZ="Europe/Berlin"
, and it seems it got it:
heroku config:get TZ
Europe/Berlin
I waited two days because I expected the server needed to update, but the problem still remains.
What is wrong and how can I fix it?
Upvotes: 0
Views: 119
Reputation: 4154
Solved by substituting, in settings.py
:
TIME_ZONE = 'UTC'
with
TIME_ZONE = 'Europe/Berlin'
Upvotes: 1