Skip to content

Commit a87669f

Browse files
authored
Merge pull request #30 from joshua-beck-0908/timezone_fix
Fixed incorrect type definition for tz_offset parameter.
2 parents d52104b + bc06b62 commit a87669f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_ntp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(
4040
*,
4141
server: str = "0.adafruit.pool.ntp.org",
4242
port: int = 123,
43-
tz_offset: int = 0,
43+
tz_offset: float = 0,
4444
socket_timeout: int = 10,
4545
) -> None:
4646
"""
@@ -56,7 +56,7 @@ def __init__(
5656
self._server = server
5757
self._port = port
5858
self._packet = bytearray(48)
59-
self._tz_offset = tz_offset * 60 * 60
59+
self._tz_offset = int(tz_offset * 60 * 60)
6060
self._socket_timeout = socket_timeout
6161

6262
# This is our estimated start time for the monotonic clock. We adjust it based on the ntp

0 commit comments

Comments
 (0)