Skip to content

Fix order of days of the week #2192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2022
Merged

Conversation

tekktrik
Copy link
Member

Fixes an issue where the order of days is incorrect in some of the guides, I think due to the change made to adafruit_regester.i2c_bcd_datetime.BCDDateTimeRegister.__get__(), which fixed the order of week days to be CPython compatible. This mirrors the change made in adafruit/Adafruit_CircuitPython_DS1307#27 and other similar libraries.

None of these guides need to be updated for content.

Did not test.

Copy link
Member

@ladyada ladyada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is due to the RTC having sunday == 0, but wday having monday==0 https://docs.python.org/3/library/time.html (which honestly i kinda disagree with but we're stuck with i suppose :D )

@TheKitty TheKitty merged commit 169bb18 into adafruit:main Jun 17, 2022
@tekktrik tekktrik deleted the dev/fix-day-order branch May 23, 2023 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants