diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -1448,7 +1448,7 @@ methods. Exactly which methods are need The default implementation of :meth:`dst` raises :exc:`NotImplementedError`. - +/ .. method:: tzinfo.tzname(dt) Return the time zone name corresponding to the :class:`.datetime` object *dt*, as @@ -1568,11 +1568,12 @@ only EST (fixed offset -5 hours), or onl .. seealso:: `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 `_ The Time Zone Database (often called tz or zoneinfo) contains code and @@ -1593,6 +1594,8 @@ to represent timezone information in the offsets are used in different days of the year or where historical changes have been made to civil time. +.. versionadded:: 3.2 + .. class:: timezone(offset[, name])