[2.2.x] Fixed #30733 -- Doc'd that datetime lookups require time zone definitions in the database.
Note was missing for date, year, iso_year, week, time, hour, minute,
and second lookups.
Backport of 29adcd215f
from master
This commit is contained in:
parent
6402855098
commit
16e5e8ff5a
|
@ -2948,7 +2948,8 @@ Example::
|
||||||
implementation of the relevant query varies among different database engines.)
|
implementation of the relevant query varies among different database engines.)
|
||||||
|
|
||||||
When :setting:`USE_TZ` is ``True``, fields are converted to the current time
|
When :setting:`USE_TZ` is ``True``, fields are converted to the current time
|
||||||
zone before filtering.
|
zone before filtering. This requires :ref:`time zone definitions in the
|
||||||
|
database <database-time-zone-definitions>`.
|
||||||
|
|
||||||
.. fieldlookup:: year
|
.. fieldlookup:: year
|
||||||
|
|
||||||
|
@ -2971,7 +2972,8 @@ SQL equivalent::
|
||||||
(The exact SQL syntax varies for each database engine.)
|
(The exact SQL syntax varies for each database engine.)
|
||||||
|
|
||||||
When :setting:`USE_TZ` is ``True``, datetime fields are converted to the
|
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:: iso_year
|
.. fieldlookup:: iso_year
|
||||||
|
|
||||||
|
@ -2991,7 +2993,8 @@ Example::
|
||||||
(The exact SQL syntax varies for each database engine.)
|
(The exact SQL syntax varies for each database engine.)
|
||||||
|
|
||||||
When :setting:`USE_TZ` is ``True``, datetime fields are converted to the
|
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:: month
|
.. fieldlookup:: month
|
||||||
|
|
||||||
|
@ -3061,8 +3064,9 @@ Example::
|
||||||
(No equivalent SQL code fragment is included for this lookup because
|
(No equivalent SQL code fragment is included for this lookup because
|
||||||
implementation of the relevant query varies among different database engines.)
|
implementation of the relevant query varies among different database engines.)
|
||||||
|
|
||||||
When :setting:`USE_TZ` is ``True``, fields are converted to the current time
|
When :setting:`USE_TZ` is ``True``, datetime fields are converted to the
|
||||||
zone before filtering.
|
current time zone before filtering. This requires :ref:`time zone definitions
|
||||||
|
in the database <database-time-zone-definitions>`.
|
||||||
|
|
||||||
.. fieldlookup:: week_day
|
.. fieldlookup:: week_day
|
||||||
|
|
||||||
|
@ -3128,7 +3132,8 @@ Example::
|
||||||
implementation of the relevant query varies among different database engines.)
|
implementation of the relevant query varies among different database engines.)
|
||||||
|
|
||||||
When :setting:`USE_TZ` is ``True``, fields are converted to the current time
|
When :setting:`USE_TZ` is ``True``, fields are converted to the current time
|
||||||
zone before filtering.
|
zone before filtering. This requires :ref:`time zone definitions in the
|
||||||
|
database <database-time-zone-definitions>`.
|
||||||
|
|
||||||
.. fieldlookup:: hour
|
.. fieldlookup:: hour
|
||||||
|
|
||||||
|
@ -3152,8 +3157,9 @@ SQL equivalent::
|
||||||
|
|
||||||
(The exact SQL syntax varies for each database engine.)
|
(The exact SQL syntax varies for each database engine.)
|
||||||
|
|
||||||
For datetime fields, when :setting:`USE_TZ` is ``True``, values are converted
|
When :setting:`USE_TZ` is ``True``, datetime fields are converted to the
|
||||||
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:: minute
|
.. fieldlookup:: minute
|
||||||
|
|
||||||
|
@ -3177,8 +3183,9 @@ SQL equivalent::
|
||||||
|
|
||||||
(The exact SQL syntax varies for each database engine.)
|
(The exact SQL syntax varies for each database engine.)
|
||||||
|
|
||||||
For datetime fields, When :setting:`USE_TZ` is ``True``, values are converted
|
When :setting:`USE_TZ` is ``True``, datetime fields are converted to the
|
||||||
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:: second
|
.. fieldlookup:: second
|
||||||
|
|
||||||
|
@ -3202,8 +3209,9 @@ SQL equivalent::
|
||||||
|
|
||||||
(The exact SQL syntax varies for each database engine.)
|
(The exact SQL syntax varies for each database engine.)
|
||||||
|
|
||||||
For datetime fields, when :setting:`USE_TZ` is ``True``, values are converted
|
When :setting:`USE_TZ` is ``True``, datetime fields are converted to the
|
||||||
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:: isnull
|
.. fieldlookup:: isnull
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue