diff options
| author | Carlton Gibson <carlton.gibson@noumenal.es> | 2021-09-09 15:15:44 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2021-09-16 12:11:05 +0200 |
| commit | 306607d5b99b6eca6ae2c1e726d8eb32b9b2ca1b (patch) | |
| tree | 607d1b06feafaf28fc2e09c70652d30659707537 /docs/ref/utils.txt | |
| parent | 7132d17de1399345a38858c20221850bdef43d0e (diff) | |
Fixed #32365 -- Made zoneinfo the default timezone implementation.
Thanks to Adam Johnson, Aymeric Augustin, David Smith, Mariusz Felisiak, Nick
Pope, and Paul Ganssle for reviews.
Diffstat (limited to 'docs/ref/utils.txt')
| -rw-r--r-- | docs/ref/utils.txt | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt index 3a7f58c5f7..d316c8a8bf 100644 --- a/docs/ref/utils.txt +++ b/docs/ref/utils.txt @@ -941,24 +941,30 @@ appropriate entities. :class:`~datetime.datetime`. If ``timezone`` is set to ``None``, it defaults to the :ref:`current time zone <default-current-time-zone>`. - When using ``pytz``, the ``pytz.AmbiguousTimeError`` exception is raised if - you try to make ``value`` aware during a DST transition where the same time - occurs twice (when reverting from DST). Setting ``is_dst`` to ``True`` or - ``False`` will avoid the exception by choosing if the time is - pre-transition or post-transition respectively. + .. deprecated:: 4.0 - When using ``pytz``, the ``pytz.NonExistentTimeError`` exception is raised - if you try to make ``value`` aware during a DST transition such that the - time never occurred. For example, if the 2:00 hour is skipped during a DST - transition, trying to make 2:30 aware in that time zone will raise an - exception. To avoid that you can use ``is_dst`` to specify how - ``make_aware()`` should interpret such a nonexistent time. If - ``is_dst=True`` then the above time would be interpreted as 2:30 DST time - (equivalent to 1:30 local time). Conversely, if ``is_dst=False`` the time - would be interpreted as 2:30 standard time (equivalent to 3:30 local time). + When using ``pytz``, the ``pytz.AmbiguousTimeError`` exception is + raised if you try to make ``value`` aware during a DST transition where + the same time occurs twice (when reverting from DST). Setting + ``is_dst`` to ``True`` or ``False`` will avoid the exception by + choosing if the time is pre-transition or post-transition respectively. - The ``is_dst`` parameter has no effect when using non-``pytz`` timezone - implementations. + When using ``pytz``, the ``pytz.NonExistentTimeError`` exception is + raised if you try to make ``value`` aware during a DST transition such + that the time never occurred. For example, if the 2:00 hour is skipped + during a DST transition, trying to make 2:30 aware in that time zone + will raise an exception. To avoid that you can use ``is_dst`` to + specify how ``make_aware()`` should interpret such a nonexistent time. + If ``is_dst=True`` then the above time would be interpreted as 2:30 DST + time (equivalent to 1:30 local time). Conversely, if ``is_dst=False`` + the time would be interpreted as 2:30 standard time (equivalent to 3:30 + local time). + + The ``is_dst`` parameter has no effect when using non-``pytz`` timezone + implementations. + + The ``is_dst`` parameter is deprecated and will be removed in Django + 5.0. .. function:: make_naive(value, timezone=None) |
