89799969 opened a new issue, #4234:
URL: https://github.com/apache/rocketmq-dashboard/issues/4234
## 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]