docs core modules time

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
laserled
 
Posts: 4
Joined: Wed Dec 16, 2015 10:07 pm

docs core modules time

Post by laserled »

In Docs Core Modules time.struct_time where tm_sec reads: tm_sec: the second, range [0, 61]. Shouldn't it be range(0, 59)

User avatar
danhalbert
 
Posts: 4652
Joined: Tue Aug 08, 2017 12:37 pm

Re: docs core modules time

Post by danhalbert »

The 0-61 range (inclusive) is due to the possibility of a leap second and an historical error about the possibility of double leap seconds.

See
https://docs.python.org/3/library/time. ... e.strftime
https://stackoverflow.com/a/765780 (look in the answer comments)

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”