You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Fix stray /cat in Europe/Brussels timezone
This commit is contained in:
@@ -40,7 +40,12 @@ def localtime():
|
||||
refresh_timezone_preference()
|
||||
ptz = timezone_to_posix_time_zone(timezone_preference)
|
||||
t = time.time()
|
||||
return localPTZtime.tztime(t, ptz)
|
||||
try:
|
||||
localtime = localPTZtime.tztime(t, ptz)
|
||||
except Exception as e:
|
||||
#print(f"localPTZtime setting got exception {e}, defaulting to non-localized time...") # this gets called too often to print
|
||||
return time.localtime()
|
||||
return localtime
|
||||
|
||||
def timezone_to_posix_time_zone(timezone):
|
||||
"""
|
||||
|
||||
@@ -137,7 +137,7 @@ TIMEZONE_MAP = {
|
||||
"Europe/Athens": "EET-2EEST,M3.5.0/3,M10.5.0/4", # Greece’s capital
|
||||
"Europe/Belgrade": "CET-1CEST,M3.5.0,M10.5.0/3", # Serbia’s capital
|
||||
"Europe/Berlin": "CET-1CEST,M3.5.0,M10.5.0/3", # Germany’s capital
|
||||
"Europe/Brussels": "CET-/cat,1CEST,M3.5.0,M10.5.0/3", # Belgium’s capital
|
||||
"Europe/Brussels": "CET-1CEST,M3.5.0,M10.5.0/3", # Belgium’s capital
|
||||
"Europe/Bucharest": "EET-2EEST,M3.5.0/3,M10.5.0/4", # Romania’s capital
|
||||
"Europe/Budapest": "CET-1CEST,M3.5.0,M10.5.0/3", # Hungary’s capital
|
||||
"Europe/Copenhagen": "CET-1CEST,M3.5.0,M10.5.0/3", # Denmark’s capital
|
||||
|
||||
Reference in New Issue
Block a user