summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAndrew <36489577+recvfrom@users.noreply.github.com>2019-08-27 17:37:24 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-08-28 09:07:35 +0200
commit16e5e8ff5a8c8eb5bfd5de999b22803819c6881e (patch)
tree3bb6b685120d712697f05dc15b140a7669c56096 /docs
parent6402855098f773f15adc2139286a552ded84f3d7 (diff)
[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 29adcd215f80383f00d9f837311e857142319722 from master
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/querysets.txt32
1 files changed, 20 insertions, 12 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index 9379359ec6..c76df17d7f 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -2948,7 +2948,8 @@ Example::
implementation of the relevant query varies among different database engines.)
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
@@ -2971,7 +2972,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:: iso_year
@@ -2991,7 +2993,8 @@ Example::
(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:: month
@@ -3061,8 +3064,9 @@ Example::
(No equivalent SQL code fragment is included for this lookup because
implementation of the relevant query varies among different database engines.)
-When :setting:`USE_TZ` is ``True``, fields are converted to the current time
-zone before filtering.
+When :setting:`USE_TZ` is ``True``, datetime fields are converted to the
+current time zone before filtering. This requires :ref:`time zone definitions
+in the database <database-time-zone-definitions>`.
.. fieldlookup:: week_day
@@ -3128,7 +3132,8 @@ Example::
implementation of the relevant query varies among different database engines.)
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
@@ -3152,8 +3157,9 @@ SQL equivalent::
(The exact SQL syntax varies for each database engine.)
-For datetime fields, when :setting:`USE_TZ` is ``True``, values are converted
-to the current time zone before filtering.
+When :setting:`USE_TZ` is ``True``, datetime fields are converted to the
+current time zone before filtering. This requires :ref:`time zone definitions
+in the database <database-time-zone-definitions>`.
.. fieldlookup:: minute
@@ -3177,8 +3183,9 @@ SQL equivalent::
(The exact SQL syntax varies for each database engine.)
-For datetime fields, When :setting:`USE_TZ` is ``True``, values are converted
-to the current time zone before filtering.
+When :setting:`USE_TZ` is ``True``, datetime fields are converted to the
+current time zone before filtering. This requires :ref:`time zone definitions
+in the database <database-time-zone-definitions>`.
.. fieldlookup:: second
@@ -3202,8 +3209,9 @@ SQL equivalent::
(The exact SQL syntax varies for each database engine.)
-For datetime fields, when :setting:`USE_TZ` is ``True``, values are converted
-to the current time zone before filtering.
+When :setting:`USE_TZ` is ``True``, datetime fields are converted to the
+current time zone before filtering. This requires :ref:`time zone definitions
+in the database <database-time-zone-definitions>`.
.. fieldlookup:: isnull