Changes between Initial Version and Version 1 of Ticket #29384, comment 3
- Timestamp:
- May 7, 2018, 9:33:19 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #29384, comment 3
initial v1 9 9 But I still don't think it's a good idea to convert utc time to local time in database when querying. 10 10 Django saves utc time to database,and database won't deal with timezone. But, actually, when querying datetime with filtering by month or day in MySQL, it need MySQL to 11 11 convert utc time (raw data) to local time (filtering condition), and then select the matching data. This process depends on the time zone tables which stores in database, rather than pytz. I think the timezone convertions should be handled by pytz both when saving and querying.