Skip to content
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

the bm8563 module return wrong week day #10

Open
xlla opened this issue Sep 8, 2024 · 0 comments
Open

the bm8563 module return wrong week day #10

xlla opened this issue Sep 8, 2024 · 0 comments

Comments

@xlla
Copy link

xlla commented Sep 8, 2024

  1. the week day return by bm8563 is differ from time.localtime, always less 1
  2. it always return same week day related to current date, no matter what value passed in
import bm8563
import time

rtcH = bm8563()
tm = time.localtime()
tm

(2024, 9, 8, 23, 56, 33, 6, 252)      <- weekday is 6, actual is sunday

result = rtcH.datetime(tm[0], tm[1], tm[2], tm[6], tm[3], tm[4], tm[5])
result

0

result = rtcH.datetime()
result

(2024, 9, 8, 0, 23, 56, 42)         <- weekday is 0

result = rtcH.datetime(tm[0], tm[1], tm[2], 3, tm[3], tm[4], tm[5])   <-  set a wrong weekday  (3) here 
result = rtcH.datetime()
result

(2024, 9, 8, 0, 23, 56, 37)       <- the weekday is still 0,  despite was set to 3

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

No branches or pull requests

1 participant