Skip to content

feat(webui): show timestamps in the user's timezone instead of IST (k8s-install) - #32

Merged
thestumonkey merged 1 commit into
k8s-installfrom
feat/user-timezone-dates-k8s
Nov 7, 2026
Merged

thestumonkey merged 1 commit into
k8s-installfrom
feat/user-timezone-dates-k8s

Conversation

@thestumonkey

Copy link
Copy Markdown
Member

Summary

Timestamps across the WebUI and the ./services CLI were hard-coded to IST (Asia/Kolkata). They now follow the signed-in user's saved timezone, falling back to the browser's.

  • utils/datetime.ts — one display-timezone authority: formatDateTime, formatTime, formatDate, useDisplayTimezone(), plus PRECISE_DATE_TIME / PRECISE_TIME presets that keep seconds on queue, audit and log views.
  • components/DateTime.tsx — <DateTime value=… /> renders a <time> element with the full stamp on hover.
  • AuthContext sets the zone from user.timezone; the Timeline "use browser timezone" action updates it immediately.
  • 18 pages/components moved off inline toLocaleString('en-IN', { timeZone: 'Asia/Kolkata' }) and literal "IST" labels.
  • Recording context / organize-day requests and chat source refs send the display zone instead of IST.
  • CLI operation stamps use the host's local zone (docs/init-system.md updated).

Stored data is unchanged: timestamps are UTC, and the user's zone is the existing users.timezone IANA name.

Not in this PR

Backend request defaults still say "Asia/Kolkata" when a client omits a zone (source_search_routes.py, chat_sources.py, timeline/recording_sessions.py). The WebUI now always sends one.

Testing

  • tsc --noEmit: clean apart from the existing ReviewCursor.ts/reviewCursor.ts case clash.
  • New utils/datetime.test.ts (5 tests) passes. AutomationSettings and OperationalClarity tests updated to pin the zone instead of asserting IST.
  • ESLint: no new problems on touched files; new files are clean.
  • Remaining failures exist on the base branch without this change: MemoryLedger.test.tsx, Timeline.test.tsx, Recordings.test.tsx (mock lacks useReprocessSummary).
  • Not yet checked in a running browser.

🤖 Generated with Claude Code

Timestamps across the WebUI and the services CLI were hard-coded to
Asia/Kolkata. Add one display-timezone authority (utils/datetime.ts) and a
<DateTime> component. The zone follows the user's saved timezone, falling
back to the browser's, and updates when the Timeline saves a new zone.

- formatDateTime/formatTime/formatDate replace per-page toLocaleString
  calls; PRECISE_* presets keep seconds on queue, audit and log views
- recording context and chat source refs send the display zone, not IST
- CLI operation stamps use the host's local zone

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thestumonkey
thestumonkey merged commit b3cf420 into k8s-install Nov 7, 2026
2 of 5 checks passed
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