summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2016-01-03 09:03:40 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2016-01-03 09:03:40 (GMT)
commit8a4e7fd6780ebf14869a7dea56121d676d465e8e (patch)
tree00ec9dd3064ce9602ffbbee6878ccd4f4a67ab14 /Doc
parent48e2b676d17f754ddcea4580f0ed6b7743b75e35 (diff)
downloadcpython-8a4e7fd6780ebf14869a7dea56121d676d465e8e.zip
cpython-8a4e7fd6780ebf14869a7dea56121d676d465e8e.tar.gz
cpython-8a4e7fd6780ebf14869a7dea56121d676d465e8e.tar.bz2
Backport doc improvements for Issue21221 - Explain the usage of tm_isdst
attribute of mktime, with valid values and meaning. Patch contributed by Andrew Scheller.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/time.rst9
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/library/time.rst b/Doc/library/time.rst
index c2ea834..b4de643 100644
--- a/Doc/library/time.rst
+++ b/Doc/library/time.rst
@@ -427,9 +427,12 @@ The module defines the following functions and data items:
Note that unlike the C structure, the month value is a range of [1, 12], not
[0, 11]. A year value will be handled as described under :ref:`Year 2000
- (Y2K) issues <time-y2kissues>` above. A ``-1`` argument as the daylight
- savings flag, passed to :func:`mktime` will usually result in the correct
- daylight savings state to be filled in.
+ (Y2K) issues <time-y2kissues>` above.
+
+ In calls to :func:`mktime`, :attr:`tm_isdst` may be set to 1 when daylight
+ savings time is in effect, and 0 when it is not. A value of -1 indicates
+ that this is not known, and will usually result in the correct state being
+ filled in.
When a tuple with an incorrect length is passed to a function expecting a
:class:`struct_time`, or having elements of the wrong type, a