[issue8810] TZ offset description is unclear in docs
New submission from Alexander Belopolsky
From http://docs.python.org/dev/py3k/library/datetime.html#datetime.tzinfo.utcoff...:
"""
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@python
components: Documentation
keywords: easy
messages: 106371
nosy: belopolsky, docs@python
priority: normal
severity: normal
status: open
title: TZ offset description is unclear in docs
versions: Python 2.7, Python 3.2
_______________________________________
Python tracker
participants (6)
-
Alexander Belopolsky
-
Ben Finney
-
Martin Panter
-
Nick Coghlan
-
Sean Reifschneider
-
Éric Araujo