[New-bugs-announce] [issue8810] TZ offset description is unclear in docs

Alexander Belopolsky report at bugs.python.org
Mon May 24 18:20:21 CEST 2010

New submission from Alexander Belopolsky <belopolsky at users.sourceforge.net>:

>From <http://docs.python.org/dev/py3k/library/datetime.html#datetime.tzinfo.utcoffset>:

tzinfo.utcoffset(self, dt)

    Return offset of local time from UTC, in minutes east of UTC. 

This suggests that the return value is an integer representing the number of minutes.  It is later explained that in fact "the value returned must be a timedelta object specifying a whole number of minutes", but many users won't read past the first sentence.

I suggest s/in minutes east of UTC/as a timedelta object/.  I think "east of UTC" is redundant given the next sentence, "If local time is west of UTC, this should be negative", but that can also be reworded for clarity as "The offset for timezones west of UTC is negative, and for those east of UTC is positive."

assignee: docs at python
components: Documentation
keywords: easy
messages: 106371
nosy: belopolsky, docs at python
priority: normal
severity: normal
status: open
title: TZ offset description is unclear in docs
versions: Python 2.7, Python 3.2

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list