From 3e50fa5b1de0e961f44a1fd2cf9408e2d7736002 Mon Sep 17 00:00:00 2001 From: Chuck <33324927+ChuckBuilds@users.noreply.github.com> Date: Wed, 25 Feb 2026 10:55:52 -0500 Subject: [PATCH] fix(timezone): use America/New_York instead of EST for ESPN API date queries (#273) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(install): add --prefer-binary to pip installs to avoid /tmp exhaustion timezonefinder (~54 MB) includes large timezone polygon data files that pip unpacks into /tmp during installation. On Raspberry Pi, the default tmpfs /tmp size (often ~half of RAM) can be too small, causing the install to fail with an out-of-space error. Adding --prefer-binary tells pip to prefer pre-built binary wheels over source distributions. Since timezonefinder and most other packages publish wheels on PyPI (and piwheels.org has ARM wheels), this avoids the large temporary /tmp extraction and speeds up installs generally. Co-Authored-By: Claude Sonnet 4.6 * fix(timezone): use America/New_York instead of EST for ESPN API date queries EST is a fixed UTC-5 offset that does not observe daylight saving time, causing the ESPN API date to be off by one hour during EDT (March–November). America/New_York correctly handles DST transitions. The ESPN scoreboard API anchors its schedule calendar to Eastern US time, so this Eastern timezone is intentionally kept for the API date — it is not user-configurable. Game time display is converted separately to the user's configured timezone. Co-Authored-By: Claude Sonnet 4.6 --------- Co-authored-by: Chuck Co-authored-by: Claude Sonnet 4.6 --- src/base_classes/sports.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base_classes/sports.py b/src/base_classes/sports.py index ed3bc018..b4e73b50 100644 --- a/src/base_classes/sports.py +++ b/src/base_classes/sports.py @@ -598,7 +598,7 @@ class SportsCore(ABC): def _fetch_todays_games(self) -> Optional[Dict]: """Fetch only today's games for live updates (not entire season).""" try: - tz = pytz.timezone("EST") + tz = pytz.timezone("America/New_York") # Use full name (not "EST") for DST support now = datetime.now(tz) yesterday = now - timedelta(days=1) formatted_date = now.strftime("%Y%m%d")