Map iot timezone index 18 to America/New_York instead of EST (#1743)

Iot firmware timezone index 18 corresponds to "(UTC-05:00) Eastern Time (US & Canada)", which observes daylight saving time. 
Previously, this was mapped to a fixed UTC-5 (EST= causing one hour off for New York local times.

Co-authored-by: monteccarlos <vld@noise.xyz>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
monteccarlos
2026-09-18 10:36:33 -04:00
committed by GitHub
parent 59c47fbe91
commit 4c2ef506bd
2 changed files with 2 additions and 2 deletions

View File

@@ -180,7 +180,7 @@ TIMEZONE_INDEX = {
15: "Canada/Saskatchewan", 15: "Canada/Saskatchewan",
16: "America/Bogota", 16: "America/Bogota",
17: "Etc/GMT+5", 17: "Etc/GMT+5",
18: "EST", 18: "America/New_York",
19: "America/Indiana/Indianapolis", 19: "America/Indiana/Indianapolis",
20: "America/Caracas", 20: "America/Caracas",
21: "America/Asuncion", 21: "America/Asuncion",

View File

@@ -14,7 +14,7 @@ def test_expected_dst_behavior_for_index_cases() -> None:
assert _expected_dst_behavior_for_index(13) is True # CST6CDT assert _expected_dst_behavior_for_index(13) is True # CST6CDT
# Fixed-offset or fixed-abbreviation zones # Fixed-offset or fixed-abbreviation zones
assert _expected_dst_behavior_for_index(34) is False # Etc/GMT+2 assert _expected_dst_behavior_for_index(34) is False # Etc/GMT+2
assert _expected_dst_behavior_for_index(18) is False # EST assert _expected_dst_behavior_for_index(18) is None # America/New_York
# Invalid index should raise KeyError # Invalid index should raise KeyError
with pytest.raises(KeyError): with pytest.raises(KeyError):
_expected_dst_behavior_for_index(999) _expected_dst_behavior_for_index(999)