From b25edc40b578d77c43c9d084db8cd6d8b393d3d9 Mon Sep 17 00:00:00 2001 From: SimolZimol <70102430+SimolZimol@users.noreply.github.com> Date: Tue, 21 Apr 2026 09:43:07 +0200 Subject: [PATCH] modified: app.py --- app.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index b9f7ac7..c2f3670 100644 --- a/app.py +++ b/app.py @@ -202,7 +202,13 @@ def wetter(): # "Aktuell" = erste Stunde >= jetzt (UTC), sonst erste verfügbare now_utc = _dt.datetime.now(_dt.timezone.utc).replace(tzinfo=None) - now_local = _dt.datetime.now(_dt.timezone.utc).astimezone() # lokale Systemzeit inkl. Zeitzone + try: + import zoneinfo + berlin = zoneinfo.ZoneInfo("Europe/Berlin") + except ImportError: + import pytz + berlin = pytz.timezone("Europe/Berlin") + now_local = _dt.datetime.now(berlin).strftime("%H:%M") current_idx = 0 for i, h in enumerate(forecast): dt = h["datetime"]