DatabaseCache doesn't work if database backend returns datetime values as strings
DatabaseCache intentionally uses cursors and converts all datetimes to naive values. This is a problem for database backends that return datetimes from the database as strings that must be converted to a datetime before being used. All reads of the expires column should be passed through DatabaseOperations.convert_values
, and timezone.make_naive
to maintain the current naive-only datetimes behavior.
Change History
(3)
Resolution: |
→ fixed
|
Status: |
new → closed
|
https://github.com/django/django/pull/1676
Patch uses typecast_timestamp and checks existing
DatabaseFeature.needs_datetime_string_cast
to match behavior of SQLCompiler without using too much of the ORM.