dxz0069 opened a new pull request, #6697:
URL: https://github.com/apache/rocketmq-dashboard/pull/6697

   ### Which Issue(s) This PR Fixes
   
   - Fixes #6695
   
   ### Brief Description
   
   `rmq_instance.gmt_create` / `gmt_modified` are written by the Studio JVM 
(`instance.setGmtCreate(LocalDateTime.now())`) and serialize as zone-less 
server-local wall clocks, but the instance page rendered both columns with 
`formatDateTime` — a browser-local parse — so every creation and update time 
was shown shifted by the server-viewer offset.
   
   `InstanceService.listInstances` now converts both stamps to UTC wall clocks 
for the JSON wire, the same convention the alert / K8s-cert family and the 
audit/ACL tables (#6686) already follow, and the page renders them with 
`formatUtcDateTime`. The stored base is not converted; the instance list has no 
CSV export, so no other path is affected.
   
   ### How Did You Test This Change
   
   ```
   cd server
   mvn -B -ntp test -Dtest='InstanceServiceTest,InstanceControllerTest' 
-Dsurefire.failIfNoSpecifiedTests=false
   Tests run: 111, Failures: 0, Errors: 0, Skipped: 0
   BUILD SUCCESS
   
   cd web
   npx vitest run src/pages/instance/__tests__/InstancePage.test.tsx
   Test Files  1 passed (1)
   Tests       28 passed (28)
   ```
   
   New tests: `listInstancesShouldSerializeTimestampsAsUtcWallTimeTest` (stored 
10:00 under Asia/Shanghai serializes as 02:00 for both stamps) and a 
viewer-zone rendering test with `TZ` stubbed to Asia/Shanghai 
(`2026-01-01T02:00:00` renders as `2026-01-01 10:00:00`).
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits
   - [x] Tests added or updated for non-trivial changes, test methods named 
`...Test`
   - [x] New UI text has both Chinese and English entries under `web/src/i18n/` 
(no new UI text)
   - [ ] Architecture constraints stay green (`mvn test` runs the ArchUnit 
checks)
   - [x] New source files carry the ASF license header (existing files only)
   - [x] Documentation touched where behaviour changed (no user-visible 
behaviour change beyond the corrected clocks)


-- 
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]

Reply via email to