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 ac7b684 commit c75df9fCopy full SHA for c75df9f
adafruit_featherwing/rtc_featherwing.py
@@ -289,9 +289,15 @@ def unixtime(self):
289
"""
290
The Current Date and Time in Unix Time
291
292
- return time.mktime(self._rtc.datetime)
+ try:
293
+ return time.mktime(self._rtc.datetime)
294
+ except (ValueError, RuntimeError) as error:
295
+ print("There was an error attempting to run time.mktime() on this board")
296
297
@unixtime.setter
298
def unixtime(self, unixtime):
299
if isinstance(unixtime, int):
- self._rtc.datetime = time.localtime(unixtime)
300
301
+ self._rtc.datetime = time.localtime(unixtime)
302
303
+ print("There was an error attempting to run time.localtime() on this board")
0 commit comments