[issue21221] Minor struct_time documentation bug
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
New submission from Andrew Scheller: The documentation for time.struct_time (in Doc/library/time.rst) explains tm_isdst as "0, 1 or -1; see below" but then doesn't really go into further detail below, other than to say "A -1 argument as the daylight savings flag, passed to mktime() will usually result in the correct daylight savings state to be filled in.". In Modules/timemodule.c there's a section which says: {"tm_isdst", "1 if summer time is in effect, 0 if not, and -1 if unknown"}, IMHO it would be nice if this more accurate info was also present in the HTML documentation. ---------- assignee: docs@python components: Documentation messages: 216158 nosy: docs@python, lurchman priority: normal severity: normal status: open title: Minor struct_time documentation bug type: enhancement versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21221> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Changes by R. David Murray <rdmurray@bitdance.com>: ---------- nosy: +belopolsky _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21221> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Changes by Ezio Melotti <ezio.melotti@gmail.com>: ---------- keywords: +easy stage: -> needs patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21221> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Changes by Rose Ames <rose@happyspork.com>: ---------- keywords: +patch Added file: http://bugs.python.org/file35211/tm_isdst.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21221> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Alexander Belopolsky added the comment:
.. 0 when it is not. -1 indicates that ..
It does not read well when the sentence starts with a number. Consider rephrasing as "The value of -1 .." or something like that. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21221> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Rose Ames added the comment: Thanks for the quick feedback! Altered to "A value of -1..." ---------- nosy: +superluser Added file: http://bugs.python.org/file35219/tm_isdst2.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21221> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Changes by Jakub Wilk <jwilk@jwilk.net>: ---------- nosy: +jwilk _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21221> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Roundup Robot added the comment: New changeset fae779a811ec by Senthil Kumaran in branch '3.4': Issue21221 - Explain the usage of tm_isdst attribute of mktime, with valid https://hg.python.org/cpython/rev/fae779a811ec New changeset 3b7a7ea1214c by Senthil Kumaran in branch '3.5': merge from 3.4 https://hg.python.org/cpython/rev/3b7a7ea1214c New changeset b729e7ae2747 by Senthil Kumaran in branch 'default': merge from 3.5 https://hg.python.org/cpython/rev/b729e7ae2747 ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21221> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Roundup Robot added the comment: New changeset f7324e5935f8 by Senthil Kumaran in branch '2.7': Backport doc improvements for Issue21221 - Explain the usage of tm_isdst https://hg.python.org/cpython/rev/f7324e5935f8 ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21221> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Changes by Senthil Kumaran <senthil@uthcode.com>: ---------- assignee: docs@python -> orsenthil nosy: +orsenthil resolution: -> fixed status: open -> closed versions: +Python 3.6 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21221> _______________________________________
participants (8)
-
Alexander Belopolsky
-
Andrew Scheller
-
Ezio Melotti
-
Jakub Wilk
-
R. David Murray
-
Rose Ames
-
Roundup Robot
-
Senthil Kumaran