Skip to content

fix(web): show recent session times in local timezone - #228

Open
lwylab wants to merge 1 commit into
VectifyAI:mainfrom
lwylab:fix/home-session-local-timezone-v2
Open

fix(web): show recent session times in local timezone#228
lwylab wants to merge 1 commit into
VectifyAI:mainfrom
lwylab:fix/home-session-local-timezone-v2

Conversation

@lwylab

@lwylab lwylab commented Aug 26, 2026

Copy link
Copy Markdown

Summary

  • Home recent-session cards stripped the Z from UTC ISO timestamps and printed the digits as wall-clock time, so users in China (UTC+8) saw times ~8 hours behind.
  • Parse as an absolute Instant and format with toLocaleString using the browser local timezone; UI language only selects locale style (zh-CN / en), not a hard-coded geographic zone.

Note

Replaces closed PR #227 — GitHub refused to reopen it because lwylab/OpenKB is a private non-fork and head refs are not readable. This PR is opened from a fresh fork lwylab/OpenKB-1.

Test plan

  • Open Workbench Home with at least one recent chat session
  • Confirm the card timestamp matches local clock (not UTC / ~8h behind in China)
  • Switch UI language between zh and en; timezone should stay local, only date/number style may change
  • Session with missing/invalid updated_at still renders without crashing
Home cards stripped the Z from UTC ISO strings and printed the digits
as wall-clock time, so China (UTC+8) users saw times ~8h behind. Parse
as Instant and format with toLocaleString using the browser timezone.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant