mirror of https://github.com/python/cpython
Add zoneinfo to the datetime documentation (GH-29038)
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>
This commit is contained in:
parent
6e35b096ac
commit
8e40ca127f
|
@ -27,6 +27,9 @@ on efficient attribute extraction for output formatting and manipulation.
|
||||||
Module :mod:`time`
|
Module :mod:`time`
|
||||||
Time access and conversions.
|
Time access and conversions.
|
||||||
|
|
||||||
|
Module :mod:`zoneinfo`
|
||||||
|
Concrete time zones representing the IANA time zone database.
|
||||||
|
|
||||||
Package `dateutil <https://dateutil.readthedocs.io/en/stable/>`_
|
Package `dateutil <https://dateutil.readthedocs.io/en/stable/>`_
|
||||||
Third-party library with expanded time zone and parsing support.
|
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::
|
.. seealso::
|
||||||
|
|
||||||
`dateutil.tz <https://dateutil.readthedocs.io/en/stable/tz.html>`_
|
:mod:`zoneinfo`
|
||||||
The :mod:`datetime` module has a basic :class:`timezone` class (for
|
The :mod:`datetime` module has a basic :class:`timezone` class (for
|
||||||
handling arbitrary fixed offsets from UTC) and its :attr:`timezone.utc`
|
handling arbitrary fixed offsets from UTC) and its :attr:`timezone.utc`
|
||||||
attribute (a UTC timezone instance).
|
attribute (a UTC timezone instance).
|
||||||
|
|
||||||
*dateutil.tz* library brings the *IANA timezone database*
|
``zoneinfo`` brings the *IANA timezone database* (also known as the Olson
|
||||||
(also known as the Olson database) to Python, and its usage is
|
database) to Python, and its usage is recommended.
|
||||||
recommended.
|
|
||||||
|
|
||||||
`IANA timezone database <https://www.iana.org/time-zones>`_
|
`IANA timezone database <https://www.iana.org/time-zones>`_
|
||||||
The Time Zone Database (often called tz, tzdata or zoneinfo) contains code
|
The Time Zone Database (often called tz, tzdata or zoneinfo) contains code
|
||||||
|
|
|
@ -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.
|
Loading…
Reference in New Issue