From: Senthil Kumaran Date: Sun, 3 Jan 2016 08:40:03 +0000 (-0800) Subject: Issue21221 - Explain the usage of tm_isdst attribute of mktime, with valid X-Git-Tag: v3.4.5rc1~41 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a880800363774848f39e1aa316aa4a44fef9c8fc;p=thirdparty%2FPython%2Fcpython.git Issue21221 - Explain the usage of tm_isdst attribute of mktime, with valid values and meaning. Patch contributed by Andrew Scheller. --- diff --git a/Doc/library/time.rst b/Doc/library/time.rst index 8d8b7d4c55e2..0a3d9772b353 100644 --- a/Doc/library/time.rst +++ b/Doc/library/time.rst @@ -550,9 +550,11 @@ 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 ``-1`` argument as the daylight - savings flag, passed to :func:`mktime` will usually result in the correct - daylight savings state to be filled in. + [0, 11]. + + 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