1 Commits
Author SHA1 Message Date
Juan DenisandClaude Opus 4.8 e3249fbd52 fix(system): report IANA timezone_id; guard chart formatting against bad zones
SystemService.get_server_time fell through to Python's time.tzname on hosts
without /etc/timezone or timedatectl (e.g. Windows dev), yielding a display
name like "Eastern Daylight Time" — not a valid IANA/Intl key. The dashboard
MetricsGraph then crashed with RangeError: Invalid time zone specified.

- Backend: add a cross-platform tzlocal fallback + an IANA-validity guard so
  timezone_id is always an IANA key or null (display name stays in
  timezone_name). Declare tzlocal in requirements.
- Frontend: MetricsGraph validates the zone and falls back to local time
  instead of throwing (defense in depth).
- Test: test_server_time_timezone.py.

ServerKit's timezone feature (get/list/set via /api/v1/system/timezone) is
unchanged — this only fixes the value reported on non-Linux hosts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 22:55:11 -04:00