Skip to content

Commit bc06b62

Browse files
Converted seconds offset to integer to eliminate rounding errors.
1 parent af00d87 commit bc06b62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_ntp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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)