modified: app.py
This commit is contained in:
8
app.py
8
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"]
|
||||
|
||||
Reference in New Issue
Block a user