Skip to content

feat(web): localize all displayed event times - #440

Open
WenjieZhao1 wants to merge 3 commits into
Willxup:mainfrom
WenjieZhao1:feat/browser-timezone
Open

feat(web): localize all displayed event times#440
WenjieZhao1 wants to merge 3 commits into
Willxup:mainfrom
WenjieZhao1:feat/browser-timezone

Conversation

@WenjieZhao1

Copy link
Copy Markdown

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.

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant