]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45515: Add zoneinfo to the datetime documentation (GH-29038) (GH-29066)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 19 Oct 2021 18:35:56 +0000 (11:35 -0700)
committerGitHub <noreply@github.com>
Tue, 19 Oct 2021 18:35:56 +0000 (20:35 +0200)
We should have done this way back when 3.9 was released, but it fell off
the radar.

Co-authored-by: Paul Ganssle <git@m.ganssle.io>
(cherry picked from commit 8e40ca127fa92d6113617c80710e0a077977a84d)

Doc/library/datetime.rst
Misc/NEWS.d/next/Library/2021-10-18-14-52-48.bpo-45515.aXdvm_.rst [new file with mode: 0644]

index 196aa84473f135aab0c029c49d60026005318ce3..0f8b70cdedb45684ebcef01a92eb5dce228124bd 100644 (file)
@@ -27,6 +27,9 @@ on efficient attribute extraction for output formatting and manipulation.
    Module :mod:`time`
       Time access and conversions.
 
+   Module :mod:`zoneinfo`
+      Concrete time zones representing the IANA time zone database.
+
    Package `dateutil <https://dateutil.readthedocs.io/en/stable/>`_
       Third-party library with expanded time zone and parsing support.
 
@@ -2174,14 +2177,13 @@ only EST (fixed offset -5 hours), or only EDT (fixed offset -4 hours)).
 
 .. seealso::
 
-   `dateutil.tz <https://dateutil.readthedocs.io/en/stable/tz.html>`_
+    :mod:`zoneinfo`
       The :mod:`datetime` module has a basic :class:`timezone` class (for
       handling arbitrary fixed offsets from UTC) and its :attr:`timezone.utc`
       attribute (a UTC timezone instance).
 
-      *dateutil.tz* library brings the *IANA timezone database*
-      (also known as the Olson database) to Python, and its usage is
-      recommended.
+      ``zoneinfo`` brings the *IANA timezone database* (also known as the Olson
+      database) to Python, and its usage is recommended.
 
    `IANA timezone database <https://www.iana.org/time-zones>`_
       The Time Zone Database (often called tz, tzdata or zoneinfo) contains code
diff --git a/Misc/NEWS.d/next/Library/2021-10-18-14-52-48.bpo-45515.aXdvm_.rst b/Misc/NEWS.d/next/Library/2021-10-18-14-52-48.bpo-45515.aXdvm_.rst
new file mode 100644 (file)
index 0000000..382733f
--- /dev/null
@@ -0,0 +1,3 @@
+Add references to :mod:`zoneinfo` in the :mod:`datetime` documentation,
+mostly replacing outdated references to ``dateutil.tz``. Change by Paul
+Ganssle.