[docs] [issue13666] datetime documentation typos

Stephen Kelly report at bugs.python.org
Mon Dec 26 23:01:54 CET 2011


New submission from Stephen Kelly <steveire at gmail.com>:

There are several bugs on 

http://docs.python.org/library/datetime.html

Section 8.1.6 references the method rzinfo.dst(), which does not exist. Presumably this should be tzinfo.dst().

Section 8.1.4 contains an implementation of a GMT2 timezone. There seems to be a bug in the utcoffset() and dst() implementations. The timedelta(hours=2) is in the dst() implementation, but it should be in the uctoffset() implementation. 

The docs for tzinfo.utcoffset() start with 'Return offset of local time from UTC, in minutes east of UTC'. Other methods (eg dst()) also document that the unit to return should be 'minutes'. However, all code samples instead return a timedelta. The documentation I quoted should instead read 'Return offset of local time from UTC as a timedelta, or None'.

----------
assignee: docs at python
components: Documentation
messages: 150272
nosy: docs at python, steveire
priority: normal
severity: normal
status: open
title: datetime documentation typos
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13666>
_______________________________________


More information about the docs mailing list