File tree Expand file tree Collapse file tree
PyPortal/PyPortal_Quarantine_Clock Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22#
33# SPDX-License-Identifier: MIT
44
5+ import os
56import time
67import board
78import busio
1314from adafruit_bitmap_font import bitmap_font
1415from adafruit_display_text import label
1516
16- try :
17- from secrets import secrets
18- except ImportError :
19- print ("""WiFi settings are kept in secrets.py, please add them there!
20- the secrets dictionary must contain 'ssid' and 'password' at a minimum""" )
21- raise
22-
2317# Label colors
2418LABEL_DAY_COLOR = 0xFFFFFF
2519LABEL_TIME_COLOR = 0x2a8eba
8882 if (not refresh_time ) or (time .monotonic () - refresh_time ) > 3600 :
8983 try :
9084 print ("Getting new time from internet..." )
91- pyportal .get_local_time (secrets [ 'timezone' ] )
85+ pyportal .get_local_time (os . getenv ( "TIMEZONE" ) )
9286 refresh_time = time .monotonic ()
9387 # set the_time
9488 the_time = time .localtime ()
You can’t perform that action at this time.
0 commit comments