[Studio][Bug] User management renders UTC session timestamps as browser-local time
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- java, typescript
- Domain
- frontend
Research direction
Start with UserManagement.tsx and the shared format.ts helper, then compare the alert and query-history fixes referenced in the issue. Trace the dateTime helper through the user-management table and CSV export; done means all listed timestamps render and export with the same UTC conversion and local display as those other pages.
Written by the indexing model from the issue text.
Description
Problem
The Studio user management page renders lastSessionSeenAt,
earestSessionExpiresAt, passwordChangedAt, gmtCreate, and gmtModified with
ew Date(value).toLocaleString(). Those values are offset-less \LocalDateTime\ strings. JavaScript therefore treats them as browser-local wall-clock times, so every viewer outside UTC sees session activity and password-change times shifted by their UTC offset.
Evidence
- \AuthService.now()\ (\server/src/main/java/org/apache/rocketmq/studio/auth/AuthService.java) writes \LocalDateTime.ofInstant(Instant.ofEpochMilli(clock.millis()), ZoneOffset.UTC)\ into session \last_seen_at\ / \expires_at\ and user \password_changed_at. The clock is \Clock.systemUTC().
- \StudioUserVO\ exposes those fields as \LocalDateTime\ (serialized without an offset).
- \UserManagement.tsx\ helper: \const dateTime = (value?: string) => (value ? new Date(value).toLocaleString() : '-');\ used by the table columns 最近活跃 / 最近过期 / 创建时间 and by the CSV export columns.
- Local reproduction (browser TZ \Asia/Shanghai, UTC+8):
ew Date('2026-08-22T09:30:00').toLocaleString()\ → \2026/8/22 09:30:00\ (wrong; should be 17:30 local).
ew Date('2026-08-22T09:30:00Z').toLocaleString()\ → \2026/8/22 17:30:00.
The same defect class was already fixed on other surfaces: alert \lastTriggered\ (#4174) and query-history \queriedAt\ (#4221 / #4222). The shared helper \ormatUtcDateTime\ in \web/src/utils/format.ts\ already appends \Z\ for offset-less values; user management never adopted it.
Expected behavior
Render and export these timestamps with \ormatUtcDateTime, matching the alert and query-history pages.
Related
#4174, #4221, #4222
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 692
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 69
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/rocketmq-dashboard
-
[Studio][Bug] Bulk-deleting a full page of alert rules steps the page back while more rules remain Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/rocketmq-dashboard#4654 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
apache/rocketmq-dashboard#4642 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/rocketmq-dashboard#4640 · 1 comment ·
-
[Bug] rmqctl fails every command with context deadline exceeded when --timeout is 0s or negative Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/rocketmq-dashboard#4628 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
apache/rocketmq-dashboard#4626 · 1 comment ·
All issues in apache/rocketmq-dashboard
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100