diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-06-22 23:26:39 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-06-22 23:26:39 (GMT) |
commit | 9b29acd1fe79ab3a157a95121da3c060e1c96469 (patch) | |
tree | 58edb7bae5b99fbb2fae22c8362e91a0665e0398 /Doc/library/datetime.rst | |
parent | f328c7dc69da14766435d8608f89d81cd878bb4d (diff) | |
download | cpython-9b29acd1fe79ab3a157a95121da3c060e1c96469.zip cpython-9b29acd1fe79ab3a157a95121da3c060e1c96469.tar.gz cpython-9b29acd1fe79ab3a157a95121da3c060e1c96469.tar.bz2 |
some timezone doc improvements (closes #16667)
From the combined efforts of Berber Peksage, Andrew Svetlov, and Yayoi Ukai.
Diffstat (limited to 'Doc/library/datetime.rst')
-rw-r--r-- | Doc/library/datetime.rst | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index e4f1eb2..e1b9e10 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -1687,11 +1687,11 @@ only EST (fixed offset -5 hours), or only EDT (fixed offset -4 hours)). .. seealso:: `pytz <http://pypi.python.org/pypi/pytz/>`_ - The standard library has no :class:`tzinfo` instances except for UTC, but - there exists a third-party library which brings the *IANA timezone - database* (also known as the Olson database) to Python: *pytz*. + The standard library has :class:`timezone` class for handling arbitrary + fixed offsets from UTC and :attr:`timezone.utc` as UTC timezone instance. - *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>`_ The Time Zone Database (often called tz or zoneinfo) contains code and @@ -1728,6 +1728,8 @@ made to civil time. *offset*, HH and MM are two digits of ``offset.hours`` and ``offset.minutes`` respectively. + .. versionadded:: 3.2 + .. method:: timezone.utcoffset(dt) Return the fixed value specified when the :class:`timezone` instance is |