mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #21095 -- Documented new requirement for dates lookups.
Day, month, and week_day lookups now require time zone definitions in the database.
This commit is contained in:
committed by
Aymeric Augustin
parent
8b366a50f4
commit
9451d8d558
@@ -2274,7 +2274,8 @@ SQL equivalent::
|
||||
(The exact SQL syntax varies for each database engine.)
|
||||
|
||||
When :setting:`USE_TZ` is ``True``, datetime fields are converted to the
|
||||
current time zone before filtering.
|
||||
current time zone before filtering. This requires :ref:`time zone definitions
|
||||
in the database <database-time-zone-definitions>`.
|
||||
|
||||
.. fieldlookup:: day
|
||||
|
||||
@@ -2297,7 +2298,8 @@ Note this will match any record with a pub_date on the third day of the month,
|
||||
such as January 3, July 3, etc.
|
||||
|
||||
When :setting:`USE_TZ` is ``True``, datetime fields are converted to the
|
||||
current time zone before filtering.
|
||||
current time zone before filtering. This requires :ref:`time zone definitions
|
||||
in the database <database-time-zone-definitions>`.
|
||||
|
||||
.. fieldlookup:: week_day
|
||||
|
||||
@@ -2321,7 +2323,8 @@ Note this will match any record with a ``pub_date`` that falls on a Monday (day
|
||||
are indexed with day 1 being Sunday and day 7 being Saturday.
|
||||
|
||||
When :setting:`USE_TZ` is ``True``, datetime fields are converted to the
|
||||
current time zone before filtering.
|
||||
current time zone before filtering. This requires :ref:`time zone definitions
|
||||
in the database <database-time-zone-definitions>`.
|
||||
|
||||
.. fieldlookup:: hour
|
||||
|
||||
|
||||
Reference in New Issue
Block a user