Skip to content

Commit d940260

Browse files
committed
Issue21221 - Explain the usage of tm_isdst attribute of mktime, with valid
values and meaning. Patch contributed by Andrew Scheller.
1 parent 2d19997 commit d940260

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Doc/library/time.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -550,9 +550,11 @@ The module defines the following functions and data items:
550550
+-------+-------------------+---------------------------------+
551551

552552
Note that unlike the C structure, the month value is a range of [1, 12], not
553-
[0, 11]. A ``-1`` argument as the daylight
554-
savings flag, passed to :func:`mktime` will usually result in the correct
555-
daylight savings state to be filled in.
553+
[0, 11].
554+
555+
In calls to :func:`mktime`, :attr:`tm_isdst` may be set to 1 when daylight
556+
savings time is in effect, and 0 when it is not. A value of -1 indicates that
557+
this is not known, and will usually result in the correct state being filled in.
556558

557559
When a tuple with an incorrect length is passed to a function expecting a
558560
:class:`struct_time`, or having elements of the wrong type, a

0 commit comments

Comments
 (0)