Repository navigation
Time zones: update the list to tz 2026e and refresh the saved code - #723
CyberNativeAI wants to merge 2 commits into
Conversation
Data/system/timezones.csv: each code is now the POSIX TZ string of IANA tz 2026e (the footer of the zone's TZif file). 10 rows change: Morocco and Western Sahara (UTC+0 since 2026-09-20), Moldova (changes at 03:00/04:00), Paraguay (permanent UTC-3), and British Columbia, Alberta, the Northwest Territories and Manitoba (no fall-back on 2026-11-01). The saved tz_code is a copy of the row from when the zone was picked, so initTimeZone() now replaces it with the bundled row for the saved name. A name that is not in the list keeps its code.
|
No actionable comments were generated in the recent review.
|
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
cdfd2648-9801-4e46-b83d-66ee431a6a3c
Files ignored due to path filters: 1-
Data/system/timezones.csvis excluded by!**/*.csv
Files selected for processing: 3-
Tactility/Private/Tactility/settings/TimePrivate.hTactility/Source/settings/time.cppTactility/Tests/Source/TimeZoneTest.cpp
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
-
findTimeZoneCode() splits the CSV on '\n'. With CRLF line endings, for example from a checkout with core.autocrlf, every line ended in '\r' and no row matched, so the saved code was never refreshed. Drop a trailing '\r' before matching. The search now also takes the CSV text as an argument, so a test can cover CRLF input.
Data/system/timezones.csvpredates several IANA tz releases. On ESP32,initTimeZone()applies the saved code withsetenv("TZ", …), so for 13 of the 461 zones newlib'slocaltimegives the wrong local time now or within the next year.Wrong today:
Africa/Casablanca,Africa/El_Aaiun): permanent UTC+0 since 2026-09-20. The list gives +1.Europe/Chisinau) changes at 03:00 and 04:00 local time, not 02:00 and 03:00, so it is an hour off around each change (next: 28 March 2027).Wrong from a coming date:
America/Vancouver) stays on UTC−7, Alberta and the Northwest Territories (America/Edmonton,America/Inuvik,America/Yellowknife) on UTC−6, and Manitoba (America/Winnipeg,America/Rainy_River) on UTC−5. The current codes fall back an hour on that date.America/Asuncion) is on permanent UTC−3, so it is wrong from March 2027.The change:
timezones.csv: each code is now the POSIX TZ string IANA tz 2026e ships for that zone (the footer of its TZif file, PyPItzdata2026.5). 10 rows change; no zone is added, removed or reordered.settings/time.cpp:time.propertieskeeps the code saved when the zone was picked, so a new list alone would not fix devices that are already set up.initTimeZone()now looks up the savedtz_namein the bundled CSV (findTimeZoneCode()) and, if that row's code differs, saves and applies it. A name that is not in the list keeps its saved code, and with no zone set nothing changes.Tests/Source/TimeZoneTest.cpp: lookup cases (first and last row, partial names,Etc/GMT+1vsEtc/GMT+10) and twoinitTimeZone()cases on the testdatafilesystem: an old Winnipeg code becomesEST5; a current code and an unlisted name stay unchanged.How it was checked:
ctest --test-dir build/Tests(the steps oftests.ymlin anubuntu:latestcontainer): all 18 test programs pass, including the 5 new cases (one runs the lookup on CRLF text). With the refresh disabled, or with the old CSV, the Winnipeg case fails.findTimeZoneCode()cut unchanged fromtime.cppand compiled with g++-std=c++23 -Werror: every one of the 461 rows returns its own code; partial and unknown names return false.tzset_r.c,lcltime_r.c, …; byte-identical in ESP-IDF's newlib fork) for the host and ranlocaltime_ron every code of both lists at every hour from 2026-10-21 to 2027-12-31, against Pythonzoneinfoon the 2026e data. Current list: 13 zones with a wrong offset. This change: 3, see below. Before 1 November the six Canadian rows reporttm_isdst0 instead of 1; the offset is already right (MST7equals PDT until then).America/Godthab,America/NuukandAmerica/Scoresbysundstill show summer time from 1 January to the last Sunday in March. Their 2026e code<-02>2<-01>,M3.5.0/-1,M10.5.0/0is correct (glibc agrees with IANA), but newlib'stzset_r.creads the/-1with%hu(65535 hours). That is a newlib bug, reported upstream; these rows are unchanged here.clang-formatwith the repo's.clang-formatreports nothing on the added lines.Africa/CasablancaAmerica/VancouverAmerica/EdmontonAmerica/WinnipegAmerica/AsuncionEurope/ChisinauEurope/AmsterdamAmerica/TorontoPrepared by CyberNative AI LLC, an AI-run company, using AI agents.
Summary by CodeRabbit