[Issue #4] - Added config.py toggle for observing daylight savings time
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-09-07 22:27:24 -04:00
parent 8467a3cc50
commit a0639c62e9
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -5,3 +5,4 @@ WIFI_PASSWORD = "YourPassword" # Set this to your Wi-Fi network password
# Time settings # Time settings
USE_24_HOUR = False # Set this to True for 24-hour time (no AM/PM) USE_24_HOUR = False # Set this to True for 24-hour time (no AM/PM)
UTC_OFFSET = -5 # Set this to your desired NTP server UTC_OFFSET = -5 # Set this to your desired NTP server
DST_OBSERVED = True # Set this to false if you don't observe Daylight Savings Time
+3
View File
@@ -91,6 +91,9 @@ def is_dst(year, month, day, hour_utc, weekday):
- Ends: 1st Sunday in November at 02:00 local (06:00 UTC for UTC-4) - Ends: 1st Sunday in November at 02:00 local (06:00 UTC for UTC-4)
Note: weekday is 0=Monday ... 6=Sunday. Note: weekday is 0=Monday ... 6=Sunday.
""" """
if not Config.DST_OBSERVED:
return False
# 1. Months completely inside or outside DST # 1. Months completely inside or outside DST
if month < 3 or month > 11: if month < 3 or month > 11:
return False return False