adafruit / Adafruit_CircuitPython_NTP

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

tz_offset is incorrectly documented in the code and documentation #17

Closed VPTechOps closed 2 years ago

VPTechOps commented 3 years ago

The code describes the tz_offset code as: :param int tz_offset: The offset of the local timezone, in seconds west of UTC (negative in most of Western Europe, positive in the US, zero in the UK). """

    try:
        now = self._esp.get_time()
        now = time.localtime(now[0] + tz_offset)

Timezone offset in the US is negative. For example MST7 is -25200.

ladyada commented 3 years ago

OK! please submit a PR if ya can :)