Apply isort and ruff code style

This commit is contained in:
Michael Osthege
2024-10-03 11:05:44 +02:00
committed by Andreas
parent 05a3c1a5bb
commit a4d178d250
23 changed files with 1787 additions and 866 deletions

View File

@@ -1,6 +1,8 @@
import datetime
import pytz
def ist_dst_wechsel(tag, timezone="Europe/Berlin"):
"""Checks if Daylight Saving Time (DST) starts or ends on a given day."""
tz = pytz.timezone(timezone)
@@ -17,9 +19,10 @@ def ist_dst_wechsel(tag, timezone="Europe/Berlin"):
return dst_change
# # Example usage
# start_date = datetime.datetime(2024, 3, 31) # Date of the DST change
# if ist_dst_wechsel(start_date):
# prediction_hours = 23 # Adjust to 23 hours for DST change days
# prediction_hours = 23 # Adjust to 23 hours for DST change days
# else:
# prediction_hours = 24 # Default value for days without DST change
# prediction_hours = 24 # Default value for days without DST change