| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Index 18 in the iot firmware timezone list corresponds to "(UTC-05:00) Eastern Time (US & Canada)", which observes daylight saving time. The fixed-offset EST key never applies DST, so devices configured for US Eastern time report times one hour off during the DST period. EST is also absent from trimmed tzdata installations (e.g. Debian 13 without tzdata-legacy). Related: python-kasa#1579, python-kasa#1508, python-kasa#1467, python-kasa#1620 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## master #1743 +/- ##
==========================================
- Coverage 93.29% 93.28% -0.02%
==========================================
Files 157 157
Lines 9932 9932
Branches 1022 1022
==========================================
- Hits 9266 9265 -1
- Misses 471 472 +1
Partials 195 195 ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
Iot firmware timezone index 18 corresponds to "(UTC-05:00) Eastern Time (US & Canada)", which observes daylight saving time. TIMEZONE_INDEX currently maps it to EST, a fixed UTC-5 zone that never applies DST — so devices set to US Eastern time (e.g. a KL125 hw 4.0 in New York) get local times one hour off for roughly eight months of the year, and get_timezone_index(ZoneInfo("America/New_York")) cannot round-trip to index 18.
The neighboring entries support this reading: index 6 is PST8PDT (Pacific with DST) and 13 is CST6CDT (Central with DST), while the fixed -5 offset already has its own entry at 17 (Etc/GMT+5). EST at 18 looks like it was meant to be the DST-observing Eastern entry.
As a side benefit, America/New_York is a canonical IANA key, unlike EST, which is missing from trimmed tzdata installations (Debian 13 without tzdata-legacy — the crash reported in #1579/#1620, now handled gracefully by the failover from #1583, but the failover then guesses with dst_expected=False for this index, cementing the wrong offset in summer).
Related issues: #1579, #1508, #1467, #1620. A similar change was proposed in #1554 (America/Toronto) and closed when #1583 fixed the crash; this PR addresses the remaining DST-correctness issue rather than the crash.
The test asserting index 18 is non-DST (tests/iot/test_iottimezone.py) is updated: the key heuristic returns None (unknown) for America/New_York, letting _guess_timezone_by_offset consider DST-observing candidates.
Checklist
🤖 Generated with Claude Code