You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ui): add per-user locale preference for date/time formatting
Hardcoded en-GB / en-US locales rendered dates the same way for every
viewer, ignoring the browser preference. Users whose locale uses ISO 8601
(e.g. sv-SE) had no way to see `2026-06-01` instead of `01/06/2026`.
Adds a LocaleProvider (mirrors ThemeProvider) backed by localStorage and
exposed under Settings → Profile → "Date & time format". The "Auto"
default resolves to `navigator.language`, so users with a Swedish
browser get ISO output without any configuration. The picker lists ~60
BCP-47 tags labelled via Intl.DisplayNames in the active locale. The
"Auto · <tag>" label always shows the real browser default rather than
the currently selected locale, so its meaning stays consistent
regardless of selection.
11 display formatters (MessageModal, TransactionModal, OTLP*,
QosPanel, ClockPanel, ResultsPanel, TimeRangePicker display, flow-data)
now read the locale from context and pass it to Intl.DateTimeFormat
instead of hardcoding `en-GB`. The cosmetic `.replace(',', '')` and the
`hour12: false` / `2-digit` overrides are dropped so the locale's
natural conventions apply; `fractionalSecondDigits: 3` is preserved
where it was (SIP packet timing).
Left untouched: `resolveTimeRange.ts` and `TimeRangePicker`'s input
formatter path. Those use `formatToParts` to read deterministic ISO
components for `<input type="datetime-local">` and timezone math — not
for display — so they keep the existing locale literal.
0 commit comments