Commit 2c02dc70 authored by Benjamin Peterson's avatar Benjamin Peterson

some timezone doc improvements (closes #16667)

From the combined efforts of Berber Peksage, Andrew Svetlov, and Yayoi Ukai.
parent 4d9ee831
...@@ -1687,11 +1687,11 @@ only EST (fixed offset -5 hours), or only EDT (fixed offset -4 hours)). ...@@ -1687,11 +1687,11 @@ only EST (fixed offset -5 hours), or only EDT (fixed offset -4 hours)).
.. seealso:: .. seealso::
`pytz <http://pypi.python.org/pypi/pytz/>`_ `pytz <http://pypi.python.org/pypi/pytz/>`_
The standard library has no :class:`tzinfo` instances except for UTC, but The standard library has :class:`timezone` class for handling arbitrary
there exists a third-party library which brings the *IANA timezone fixed offsets from UTC and :attr:`timezone.utc` as UTC timezone instance.
database* (also known as the Olson database) to Python: *pytz*.
*pytz* contains up-to-date information and its usage is recommended. *pytz* library brings the *IANA timezone database* (also known as the
Olson database) to Python and its usage is recommended.
`IANA timezone database <http://www.iana.org/time-zones>`_ `IANA timezone database <http://www.iana.org/time-zones>`_
The Time Zone Database (often called tz or zoneinfo) contains code and The Time Zone Database (often called tz or zoneinfo) contains code and
...@@ -1728,6 +1728,8 @@ made to civil time. ...@@ -1728,6 +1728,8 @@ made to civil time.
*offset*, HH and MM are two digits of ``offset.hours`` and *offset*, HH and MM are two digits of ``offset.hours`` and
``offset.minutes`` respectively. ``offset.minutes`` respectively.
.. versionadded:: 3.2
.. method:: timezone.utcoffset(dt) .. method:: timezone.utcoffset(dt)
Return the fixed value specified when the :class:`timezone` instance is Return the fixed value specified when the :class:`timezone` instance is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment