Prepare for 2.5.0 release
[weather.git] / weather.py
index cf9bc23..781d619 100644 (file)
@@ -6,7 +6,7 @@ weather_copyright = """\
 # provided in the LICENSE file distributed with this software.
 #"""
 
-weather_version = "2.4.4"
+weather_version = "2.5.0"
 
 radian_to_km = 6372.795484
 radian_to_mi = 3959.871528
@@ -328,7 +328,13 @@ def get_alert(
                 # hours ago
                 import datetime, zoneinfo
                 expiration = datetime.datetime.fromisoformat(
-                    "%sT%sZ" % (expirycheck[1][:8], expirycheck[1][-4:]))
+                    "%s-%s-%sT%s:%s" % (
+                        expirycheck[1][:4],
+                        expirycheck[1][4:6],
+                        expirycheck[1][6:8],
+                        expirycheck[1][8:10],
+                        expirycheck[1][-2:],
+                    )).replace(tzinfo=zoneinfo.ZoneInfo("UTC"))
                 now = datetime.datetime.now(tz=zoneinfo.ZoneInfo("UTC"))
                 if now - expiration > datetime.timedelta(hours=delay):
                     return ""