Skip to content

Bug with month register #8

@fabiox23

Description

@fabiox23

Hi, I believe there is a little bug on line 70 of the init.py file.

The mask should be 0b00011111 instead of 0b00001111.

This is causing month 'October' to become '0' when reading the date which would produce an error by the Python interpreter (month outside the range 1..12). Also 'November' would become '1' (January) and 'December' would become '2' (February).

I was going crazy! I didn't understand as to why all of a sudden the library wouldn't work anymore. Luckily, it's an easy fix!

BitField('month', 0b00001111, adapter=BCDAdapter()),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions