Skip to content

Default dashboard timestamps to the viewer's browser timezone - #1800

Merged
HazAT merged 2 commits into
mainfrom
fix/dashboard-timezone-browser-default
Sep 11, 2026
Merged

Default dashboard timestamps to the viewer's browser timezone#1800
HazAT merged 2 commits into
mainfrom
fix/dashboard-timezone-browser-default

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Fixes #1799.

Dashboard timestamps were forced to a single server-wide timezone (process.env.JUNIOR_TIMEZONE || "America/Los_Angeles"), so every viewer saw times in Pacific regardless of their own location.

Change

  • dashboardTimeZone() in app.ts now returns the JUNIOR_TIMEZONE env var only when explicitly set, otherwise undefined.
  • /api/config's timeZone field is now optional; it's omitted entirely unless an operator configured an override.
  • The dashboard client (format.ts) now defaults its display timezone to Intl.DateTimeFormat().resolvedOptions().timeZone (the viewer's own browser timezone), and only overrides it when the server sends an explicit timeZone.
  • Updated the two call sites in ConversationWorkspace.tsx that read the raw (now possibly-undefined) config field to use the resolved getDashboardTimeZone() helper instead.

Testing

  • pnpm --filter @sentry/junior-dashboard run typecheck passes.
  • pnpm --filter @sentry/junior-dashboard exec vitest run — 313/313 tests pass (updated dashboard-routes.test.ts and telemetry-components.test.tsx for the new default/override behavior).

Not addressed

The related 12h/24h hour-format issue (hourCycle) is a separate browser/locale limitation, not something this app can reliably control — not in scope here.

via Daniel Szoke.

--

View Junior Session in Sentry

…ezone

Dashboard timestamps were forced to a single server-wide timezone
(process.env.JUNIOR_TIMEZONE || "America/Los_Angeles"), so every
viewer saw times in Pacific regardless of their own location.

- Server now only reports timeZone in /api/config when an operator
  explicitly sets JUNIOR_TIMEZONE; otherwise the field is omitted.
- Client defaults the display timezone to
  Intl.DateTimeFormat().resolvedOptions().timeZone (the viewer's
  browser timezone) and only overrides it when the server sends an
  explicit value.

Fixes #1799

Co-Authored-By: Daniel Szoke <daniel.szoke@sentry.io>
@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Sep 8, 2026 9:16am UTC

Request Review

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

13 screenshot changes — 13 changed · 0 added · 0 removed

Review screenshots in Frameshift

Conversation Attachment · Desktop
Conversation Attachment · Desktop
Changed
Conversation Attachment · Mobile
Conversation Attachment · Mobile
Changed
Conversation Detail · Desktop
Conversation Detail · Desktop
Changed
Conversation Detail · Mobile
Conversation Detail · Mobile
Changed
Conversation Detail Focused · Mobile
Conversation Detail Focused · Mobile
Changed
Gallery Transcripts · Desktop
Gallery Transcripts · Desktop
Changed
Show 7 more changed screenshots
People · Desktop
People · Desktop
Changed
People · Mobile
People · Mobile
Changed
Task Executions · Desktop
Task Executions · Desktop
Changed
Task Executions · Mobile
Task Executions · Mobile
Changed
Tasks List · Desktop
Tasks List · Desktop
Changed
Tasks Runs · Desktop
Tasks Runs · Desktop
Changed
Tasks Runs · Mobile
Tasks Runs · Mobile
Changed

ConversationWorkspace no longer reads props.data (timezone lookups
moved to getDashboardTimeZone()), which tripped oxlint's
no-unused-vars rule in CI. Drop the now-dead prop from the component
and its two App.tsx call sites instead of keeping an unused
parameter.
@HazAT
HazAT marked this pull request as ready for review September 9, 2026 21:05
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Sep 9, 2026
@HazAT
HazAT merged commit fb31b36 into main Sep 11, 2026
39 checks passed
@HazAT
HazAT deleted the fix/dashboard-timezone-browser-default branch September 11, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard timestamps always show Pacific time, ignoring browser timezone

1 participant