Files
slate32/sdcard/lib/timezones.lua
evan 2cdb7b3702 feat: timezone setting and main-axis justify in the ui toolkit
The launcher clock read UTC and sat next to the title because the toolkit could only
stack children from the start of an axis. justify adds the CSS main-axis modes that
had a caller -- start, end, center, between -- so a header keeps its title left and
its clock right without any app doing arithmetic.

Timezones are stored as POSIX TZ rules rather than offsets, so newlib applies DST
changeovers and os.date() in Lua reports local time with no binding of its own.
/lib/timezones.lua is only the picker list: a zone missing from it still works if its
rule is written into settings, the same split themes already use.

settings_calibration.lua now finds rows by label. Adding the timezone row shifted
every hardcoded y coordinate in it, which is the failure that had been predicted and
would have silently retargeted taps at the wrong control.
2026-08-01 17:03:55 -04:00

28 lines
1.2 KiB
Lua

-- Picker list for the settings app. The firmware stores the POSIX TZ rule itself, so
-- this file is a convenience, not a lookup table: add a row and the zone appears, and
-- a zone that is not here can still be set by writing its rule into /settings.lua.
--
-- Rules carry their own DST changeover dates, which is why they are spelled out rather
-- than reduced to an offset.
return {
{name = "UTC", tz = "UTC0"},
{name = "London", tz = "GMT0BST,M3.5.0/1,M10.5.0"},
{name = "Berlin", tz = "CET-1CEST,M3.5.0,M10.5.0/3"},
{name = "Athens", tz = "EET-2EEST,M3.5.0/3,M10.5.0/4"},
{name = "Dubai", tz = "<+04>-4"},
{name = "Kolkata", tz = "IST-5:30"},
{name = "Shanghai", tz = "CST-8"},
{name = "Tokyo", tz = "JST-9"},
{name = "Sydney", tz = "AEST-10AEDT,M10.1.0,M4.1.0/3"},
{name = "Auckland", tz = "NZST-12NZDT,M9.5.0,M4.1.0/3"},
{name = "Sao Paulo", tz = "<-03>3"},
{name = "New York", tz = "EST5EDT,M3.2.0,M11.1.0"},
{name = "Chicago", tz = "CST6CDT,M3.2.0,M11.1.0"},
{name = "Denver", tz = "MST7MDT,M3.2.0,M11.1.0"},
{name = "Phoenix", tz = "MST7"},
{name = "Los Angeles", tz = "PST8PDT,M3.2.0,M11.1.0"},
{name = "Anchorage", tz = "AKST9AKDT,M3.2.0,M11.1.0"},
{name = "Honolulu", tz = "HST10"},
}