Skip to content

the bm8563 module return wrong week day #10

@xlla

Description

@xlla
  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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions