Skip to content

Commit cf1991a

Browse files
Fix stray /cat in Europe/Brussels timezone
1 parent fca2c6a commit cf1991a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

internal_filesystem/lib/mpos/time.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ def localtime():
4040
refresh_timezone_preference()
4141
ptz = timezone_to_posix_time_zone(timezone_preference)
4242
t = time.time()
43-
return localPTZtime.tztime(t, ptz)
43+
try:
44+
localtime = localPTZtime.tztime(t, ptz)
45+
except Exception as e:
46+
#print(f"localPTZtime setting got exception {e}, defaulting to non-localized time...") # this gets called too often to print
47+
return time.localtime()
48+
return localtime
4449

4550
def timezone_to_posix_time_zone(timezone):
4651
"""

internal_filesystem/lib/mpos/timezones.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
"Europe/Athens": "EET-2EEST,M3.5.0/3,M10.5.0/4", # Greece’s capital
138138
"Europe/Belgrade": "CET-1CEST,M3.5.0,M10.5.0/3", # Serbia’s capital
139139
"Europe/Berlin": "CET-1CEST,M3.5.0,M10.5.0/3", # Germany’s capital
140-
"Europe/Brussels": "CET-/cat,1CEST,M3.5.0,M10.5.0/3", # Belgium’s capital
140+
"Europe/Brussels": "CET-1CEST,M3.5.0,M10.5.0/3", # Belgium’s capital
141141
"Europe/Bucharest": "EET-2EEST,M3.5.0/3,M10.5.0/4", # Romania’s capital
142142
"Europe/Budapest": "CET-1CEST,M3.5.0,M10.5.0/3", # Hungary’s capital
143143
"Europe/Copenhagen": "CET-1CEST,M3.5.0,M10.5.0/3", # Denmark’s capital

0 commit comments

Comments
 (0)