Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #30733 -- Doc'd that datetime lookups require time zone definitions in the database. #11718

Merged
merged 1 commit into from
Aug 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 20 additions & 12 deletions docs/ref/models/querysets.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2969,7 +2969,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
felixxm marked this conversation as resolved.
Show resolved Hide resolved
zone before filtering.
zone before filtering. This requires :ref:`time zone definitions in the
database <database-time-zone-definitions>`.

.. fieldlookup:: year

Expand All @@ -2994,7 +2995,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

Expand All @@ -3014,7 +3016,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

Expand Down Expand Up @@ -3088,8 +3091,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

Expand Down Expand Up @@ -3155,7 +3159,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

Expand All @@ -3181,8 +3186,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

Expand All @@ -3208,8 +3214,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

Expand All @@ -3235,8 +3242,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

Expand Down