From 7c73e7cf9750c7597e4b550a7c0ad3cb8a0c2dd7 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Mon, 7 Sep 2026 22:27:24 -0400 Subject: [PATCH] [Issue #2] - Added config.py toggle for observing daylight savings time --- config.example.py | 1 + main.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/config.example.py b/config.example.py index 21fd9af..6760316 100644 --- a/config.example.py +++ b/config.example.py @@ -5,3 +5,4 @@ WIFI_PASSWORD = "YourPassword" # Set this to your Wi-Fi network password # Time settings 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 +DST_OBSERVED = True # Set this to false if you don't observe Daylight Savings Time diff --git a/main.py b/main.py index 52ab8c6..2b6525e 100644 --- a/main.py +++ b/main.py @@ -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) Note: weekday is 0=Monday ... 6=Sunday. """ + if not Config.DST_OBSERVED: + return False + # 1. Months completely inside or outside DST if month < 3 or month > 11: return False