Fix #5520. Incorrect double calculation of daylight savings and UTC zone.

This commit is contained in:
Dion Moult
2024-10-10 22:02:50 +11:00
parent c75e2e3fc0
commit dc1842dbe8
@@ -125,6 +125,8 @@ def update_sun_path(self):
local_time = timezone.localize(dt, is_dst=None)
sun_props.use_daylight_savings = bool(local_time.dst())
sun_props.UTC_zone = local_time.utcoffset().total_seconds() / 3600
if sun_props.use_daylight_savings:
sun_props.UTC_zone -= 1
zone = -sun_props.UTC_zone
if sun_props.use_daylight_savings:
zone -= 1