feat(web): localize all displayed event times - #440
Conversation
User-visible event timestamps previously followed the server or runtime timezone, causing incorrect dates for users in different regions. Add a browser-first IANA timezone preference with localStorage persistence and an America/Chicago fallback, then route refresh timestamps through the shared formatter. This keeps the same UTC instant while rendering each user's selected timezone, including DST-aware offsets.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da4c0bf14d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -1,3 +1,4 @@ | |||
| import { formatDateTime } from '@/utils/timezone'; | |||
There was a problem hiding this comment.
Apply the selected timezone to timestamp renderers
The new formatter is only imported and never called, while event tables still format timestamps by slicing their source strings (for example, RequestEventsDetailsCard.tsx:219-223 and CredentialRequestEventsList.tsx:54-58). Consequently, choosing America/Chicago, Asia/Tokyo, or any other option updates the footer text and localStorage but leaves every displayed event time unchanged; the preference must be propagated to and trigger rerenders of the actual timestamp components.
Useful? React with 👍 / 👎.
Replace source-string slicing in both request event tables with the shared IANA-aware formatter. Subscribe timestamp renderers to timezone and storage changes so selecting a different display timezone immediately recomputes existing rows without a page reload.
Apply the selected browser timezone to credential error events, health timestamps, and inspection completion times. Subscribe these renderers to timezone preference changes so existing rows and details update immediately instead of retaining server-formatted clock values.
User-visible event timestamps previously followed the server or runtime timezone, causing incorrect dates for users in different regions. Add a browser-first IANA timezone preference with localStorage persistence and an America/Chicago fallback, then route refresh timestamps through the shared formatter. This keeps the same UTC instant while rendering each user's selected timezone, including DST-aware offsets.