We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 059aeeb commit 80ff5b5Copy full SHA for 80ff5b5
adafruit_ntp.py
@@ -65,11 +65,13 @@ def set_time(self, tz_offset=0):
65
"""Fetches and sets the microcontroller's current time
66
in seconds since since Jan 1, 1970.
67
68
- :param int tz_offset: Timezone offset from GMT
+ :param int tz_offset: The offset of the local timezone,
69
+ in seconds west of UTC (negative in most of Western Europe,
70
+ positive in the US, zero in the UK).
71
"""
72
try:
73
now = self._esp.get_time()
- now = time.localtime(now[0] + (tz_offset * 3600)) # 3600 seconds in an hour
74
+ now = time.localtime(now[0] + tz_offset)
75
rtc.RTC().datetime = now
76
self.valid_time = True
77
except ValueError as error:
0 commit comments