webomania
webomania
RRailway
Created by webomania on 4/28/2024 in #✋|help
Django app, slow server response
I am having django app, regular django templates. Database is on google cloud. This is railway response: https://i.imgur.com/E8E258d.png This is from localhost: https://i.imgur.com/vSFdilW.png both are hitting the same database, which takes 400ms.
17 replies
RRailway
Created by webomania on 10/8/2023 in #✋|help
Django app save DateTimeField in different timezone
This is the settings.py for time zone: TIME_ZONE = "America/Toronto" USE_TZ = False Saving a field to Postgresql database doesn't save in UTC timezone, but 4 hours ahead. For example now it's 17:28 in Toronto. Saving to database saves this time: 2023-10-08 21:28:57.613 -0400 which means that's 2023-10-09 01:28:57:57.613 in UTC time. Also, datetime saved to database is affected with TIME_ZONE settings. While on Heroku it doesn't change anything. Heroku still save correct time. Why is that? How to fix it?
15 replies