peterhinch / micropython-samples

Assorted code ideas, unofficial MP FAQ, plus index to my other repositories.
MIT License
442 stars 91 forks source link

Comment correction @ save_time function #29

Closed Kyuchumimo closed 1 year ago

Kyuchumimo commented 1 year ago

See: https://docs.micropython.org/en/latest/library/time.html#time.localtime • weekday is 0-6 for Mon-Sun

Kyuchumimo commented 1 year ago

Closed because the DS3231 stores the day in a range from 1 to 7 according to the datasheet. The function get_time calls the function convert which compensates the result subtracting 1 from the variable wday