You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "dxz0069 (via GitHub)" <gi...@apache.org> on 2026/10/15 03:22:32 UTC
[I] [Studio][Bug] Instance page renders zone-less server-local creation timestamps as browser-local [rocketmq-dashboard]
dxz0069 opened a new issue, #6695:
URL: https://github.com/apache/rocketmq-dashboard/issues/6695
### Before Creating the Bug Report
- [x] I have searched the [open issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository and believe that this is not a duplicate.
- [x] This is a defect in RocketMQ Studio, not a usage question and not a defect in another Apache RocketMQ repository.
- [x] I can reproduce this on the current `rocketmq-studio` branch.
### Studio Version
branch: `rocketmq-studio`
git commit id: `e2f815fb`
verified by: reading `InstanceService.listInstances` and the instance page renders against that commit
### Describe the Bug
`rmq_instance.gmt_create` / `gmt_modified` are written by the Studio JVM (`instance.setGmtCreate(LocalDateTime.now())`, `InstanceService.java:231`) and serialize as zone-less server-local wall clocks. The instance page renders both columns with `formatDateTime` — a bare `new Date` parse, i.e. browser-local (`web/src/pages/instance/index.tsx:633` and `:645`):
```tsx
{formatDateTime(d)}
```
So whenever the browser zone differs from the server zone (a UTC container deployment viewed from UTC+8), every 创建时间/更新时间 on the instance list is shown shifted by the offset — up to many hours off — while other pages that already follow the UTC-wire convention (alerts, K8s certs, and the audit/ACL tables in #6686) render correctly for the same viewer.
This is the same defect family as #6679, one branch over: the instance list was not covered there.
### Steps to Reproduce
Reproduced by inspection against `rocketmq-studio@e2f815fb`:
1. Deploy Studio with the server JVM/MySQL session in UTC (`TZ=UTC` is the common container default).
2. Open the instance list from a UTC+8 browser.
3. The 创建时间 column shows each instance created 8 hours later than it was (server-local `02:00` is parsed as viewer-local `02:00`, which is `10:00` server time).
### What Did You Expect to See
The page should not silently reinterpret a server-local wall clock as the viewer's own. The fix direction #6686 established for the audit/ACL tables applies: convert at the JSON read path (`InstanceService.listInstances`) from the server zone to UTC and render with the existing `formatUtcDateTime`; storage stays zone-less server-local.
### Additional Context
`formatUtcDateTime` and (since #6686) `parseUtcDateTime` already exist in `web/src/utils/format.ts`; the instance page just does not use them. The instance list has no CSV export, so no export path is affected.
--
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: commits-unsubscribe@rocketmq.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org