mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Fix #5520. Incorrect double calculation of daylight savings and UTC zone.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user