Commit b0844109ca “settings: Show UTC
offsets in timezone dropdown” (#33609) baked a fixed UTC offset for
each time zone into the generated timezones.json at installation time.
UTC offsets are not constants: they change with daylight saving
time (and tzdata updates), so the baked values were wrong for much of
the year. The Python formatting was also incorrect for zones with
negative fractional-hour offsets (divmod rounds toward negative
infinity, so America/St_Johns at UTC-03:30 rendered as UTC-4:30).
Revert the generated file to a plain list of names, and compute each
offset in the web app when the picker is rendered, reusing the
UTC±HH:MM formatting that message timestamp tooltips use. Computing
all 446 offsets takes ~50ms the first time and ~1ms once @date-fns/tz
has cached its formatters.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Anders Kaseorg <anders@zulip.com>