summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorHasan Ramezani <hasan.r67@gmail.com>2020-02-18 18:12:51 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-03-20 12:55:33 +0100
commit53b6a466d89f972aa435fe7b5135e9b501ce68ee (patch)
tree79764700fb91a071c231e7351f4919303b927998 /docs/ref
parent2695ac8e0441b4d7e5460eac3bb7ea315164a6bf (diff)
Refs #29724 -- Added is_dst parameter to QuerySet.datetimes().
Thanks Simon Charette for the review and Mariusz Felisiak for tests.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/querysets.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index 6b042d305e..9647b1a8ff 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -759,7 +759,7 @@ Examples::
``datetimes()``
~~~~~~~~~~~~~~~
-.. method:: datetimes(field_name, kind, order='ASC', tzinfo=None)
+.. method:: datetimes(field_name, kind, order='ASC', tzinfo=None, is_dst=None)
Returns a ``QuerySet`` that evaluates to a list of :class:`datetime.datetime`
objects representing all available dates of a particular kind within the
@@ -781,6 +781,14 @@ object. If it's ``None``, Django uses the :ref:`current time zone
<default-current-time-zone>`. It has no effect when :setting:`USE_TZ` is
``False``.
+``is_dst`` indicates whether or not ``pytz`` should interpret nonexistent and
+ambiguous datetimes in daylight saving time. By default (when ``is_dst=None``),
+``pytz`` raises an exception for such datetimes.
+
+.. versionadded:: 3.1
+
+ The ``is_dst`` parameter was added.
+
.. _database-time-zone-definitions:
.. note::