Skip to content

tz_offset is incorrectly documented in the code and documentation #17

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

Closed
VPTechOps opened this issue Apr 17, 2021 · 1 comment · Fixed by #20
Closed

tz_offset is incorrectly documented in the code and documentation #17

VPTechOps opened this issue Apr 17, 2021 · 1 comment · Fixed by #20
Labels
documentation Improvements or additions to documentation

Comments

@VPTechOps
Copy link

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
Copy link
Member

ladyada commented Apr 17, 2021

OK! please submit a PR if ya can :)

@ladyada ladyada added the documentation Improvements or additions to documentation label Apr 17, 2021
tannewt added a commit to tannewt/Adafruit_CircuitPython_NTP that referenced this issue May 12, 2022
This completely redoes the library in favor of using a native
socket to fetch time from an NTP server.

Fixes adafruit#17 and fixes adafruit#16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants