adafruit / Adafruit_CircuitPython_NTP

Network Time Protocol (NTP) Helper for CircuitPython
MIT License
9 stars 18 forks source link

The tz_offset attribute is a float, not an int. #29

Closed BiffoBear closed 1 year ago

BiffoBear commented 1 year ago

tz_offset: int = 0 should be tz_offset: float = 0.0 as India is at UTC +5.5 hours for example.

self._tz_offset = tz_offset * 60 * 60 can be cast to int if required.

joshua-beck-0908 commented 1 year ago

Yeah, having the exact same problem in Australia. There's lots of sloppy timezone code out there that assumes all time zones are aligned to whole-hour intervals. I'll see if I can put in a pull request.

FoamyGuy commented 1 year ago

resolved by #30