This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Minor struct_time documentation bug
Type: enhancement Stage: needs patch
Components: Documentation Versions: Python 3.6, Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: orsenthil Nosy List: belopolsky, docs@python, jwilk, lurchman, orsenthil, python-dev, superluser
Priority: normal Keywords: easy, patch

Created on 2014-04-14 18:29 by lurchman, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
tm_isdst.patch superluser, 2014-05-10 23:52 review
tm_isdst2.patch superluser, 2014-05-11 22:51 review
Messages (5)
msg216158 - (view) Author: Andrew Scheller (lurchman) * Date: 2014-04-14 18:29
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.
msg218242 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2014-05-11 00:01
> .. 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.
msg218303 - (view) Author: Rose Ames (superluser) * Date: 2014-05-11 22:51
Thanks for the quick feedback!  Altered to "A value of -1..."
msg257405 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-01-03 09:04
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
msg257406 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-01-03 09:04
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
History
Date User Action Args
2022-04-11 14:58:01adminsetgithub: 65420
2016-01-03 09:14:29orsenthilsetstatus: open -> closed
versions: + Python 3.6
nosy: + orsenthil

assignee: docs@python -> orsenthil
resolution: fixed
2016-01-03 09:04:24python-devsetmessages: + msg257406
2016-01-03 09:04:14python-devsetnosy: + python-dev
messages: + msg257405
2014-05-12 09:29:13jwilksetnosy: + jwilk
2014-05-11 22:51:28superlusersetfiles: + tm_isdst2.patch
nosy: + superluser
messages: + msg218303

2014-05-11 00:01:28belopolskysetmessages: + msg218242
2014-05-10 23:52:56superlusersetfiles: + tm_isdst.patch
keywords: + patch
2014-04-20 22:57:25ezio.melottisetkeywords: + easy
stage: needs patch
2014-04-20 05:57:42r.david.murraysetnosy: + belopolsky
2014-04-14 18:29:20lurchmancreate