Changes between Initial Version and Version 1 of Ticket #34659
- Timestamp:
- Jun 16, 2023, 8:45:38 AM (18 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #34659 – Description
initial v1 1 1 To test whether a mysql server has the zoninfo database loaded (feature name: `has_zoneinfo_database`), the [following code](https://github.com/django/django/blob/1fe0b167af3611cca79e8a8092ee929312193c6f/django/db/backends/mysql/base.py#L410) is run: 2 2 3 ``` 3 4 {{{ 4 5 CONVERT_TZ('2001-01-01 01:00:00', 'UTC', 'UTC') IS NOT NULL 5 ``` 6 }}} 7 8 6 9 7 10 However, this test is not actually used (i.e. there is no condition on the feature being True) when [generating sql](https://github.com/django/django/blob/main/django/db/backends/mysql/operations.py#L94), despite the fact that the generated sql contains something that we know will evaluate to `NULL` … … 9 12 This shows up when filtering like so: 10 13 11 ``` 14 {{{ 12 15 Foo.objects(some_datetimefield__date="2023-06-16") 13 ``` 16 }}} 17 14 18 which evaluates to the empty queryset, despite there being such objects. `USE_TZ = True`, obviously 15 19