Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9b29acd

Browse files
committed
some timezone doc improvements (closes #16667)
From the combined efforts of Berber Peksage, Andrew Svetlov, and Yayoi Ukai.
1 parent f328c7d commit 9b29acd

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

Doc/library/datetime.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,11 +1687,11 @@ only EST (fixed offset -5 hours), or only EDT (fixed offset -4 hours)).
16871687
.. seealso::
16881688

16891689
`pytz <http://pypi.python.org/pypi/pytz/>`_
1690-
The standard library has no :class:`tzinfo` instances except for UTC, but
1691-
there exists a third-party library which brings the *IANA timezone
1692-
database* (also known as the Olson database) to Python: *pytz*.
1690+
The standard library has :class:`timezone` class for handling arbitrary
1691+
fixed offsets from UTC and :attr:`timezone.utc` as UTC timezone instance.
16931692

1694-
*pytz* contains up-to-date information and its usage is recommended.
1693+
*pytz* library brings the *IANA timezone database* (also known as the
1694+
Olson database) to Python and its usage is recommended.
16951695

16961696
`IANA timezone database <http://www.iana.org/time-zones>`_
16971697
The Time Zone Database (often called tz or zoneinfo) contains code and
@@ -1728,6 +1728,8 @@ made to civil time.
17281728
*offset*, HH and MM are two digits of ``offset.hours`` and
17291729
``offset.minutes`` respectively.
17301730

1731+
.. versionadded:: 3.2
1732+
17311733
.. method:: timezone.utcoffset(dt)
17321734

17331735
Return the fixed value specified when the :class:`timezone` instance is

0 commit comments

Comments
 (0)