1👍
✅
I found an answer to my question in PostgreSQL documentation 8.5.3. Time Zones:
The SQL command SET TIME ZONE sets the time zone for the session.
I was able to solve this by setting timezone in postgresql.conf (for me it was located in /etc/postgresql/9.5/main).
👤NST
0👍
Django sets its own timezone when you use a DateTimeField. In your settings.py, you should find this setting:
TIME_ZONE='UTC'
You can disable djangos timezone-usage by setting this to None
. However, I believe that would simply convert all DateTimeField-values into values without a timezone. (didn’t try it)
I recommend using djangos TIME_ZONE
setting in any case, since it ensures consistency over all databases.
- Setting initial values in Django Form
- Emails sent in django appear quoted in mail client
- Django rest frame work : oscarapi authentication is not working
- Django Integrity Error when adding post in a form that excludes a foreign key
- Unexpected Circular Dependency in migration files
Source:stackexchange.com