Fix stray /cat in Europe/Brussels timezone

This commit is contained in:
Thomas Farstrike
2025-10-20 22:17:43 +02:00
parent fca2c6a396
commit cf1991a602
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -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):
"""
+1 -1
View File
@@ -137,7 +137,7 @@ TIMEZONE_MAP = {
"Europe/Athens": "EET-2EEST,M3.5.0/3,M10.5.0/4", # Greeces capital
"Europe/Belgrade": "CET-1CEST,M3.5.0,M10.5.0/3", # Serbias capital
"Europe/Berlin": "CET-1CEST,M3.5.0,M10.5.0/3", # Germanys capital
"Europe/Brussels": "CET-/cat,1CEST,M3.5.0,M10.5.0/3", # Belgiums capital
"Europe/Brussels": "CET-1CEST,M3.5.0,M10.5.0/3", # Belgiums capital
"Europe/Bucharest": "EET-2EEST,M3.5.0/3,M10.5.0/4", # Romanias capital
"Europe/Budapest": "CET-1CEST,M3.5.0,M10.5.0/3", # Hungarys capital
"Europe/Copenhagen": "CET-1CEST,M3.5.0,M10.5.0/3", # Denmarks capital