dxz0069 opened a new pull request, #6699: URL: https://github.com/apache/rocketmq-dashboard/pull/6699
### Which Issue(s) This PR Fixes - Fixes #6698 ### Brief Description `rmq_topic` / `rmq_group` rows carry `gmtCreate`/`gmtModified` written on first discovery as zone-less server-local wall clocks, but the topic and consumer pages rendered them with browser-local parsing (`formatDateTime`), so every creation time was shown shifted by the server-viewer offset. Both CSV exports wrote the same server-local values with a header that named no zone. - **JSON wire**: the topic and consumer-group list endpoints convert both stamps to UTC wall clocks, the convention the alert / K8s-cert family, #6686 (audit/ACL) and #6695 (instance) already follow; the pages render with `formatUtcDateTime`. The conversion lives on the controller exits deliberately: `findTopic` and the write paths consume the `MetadataService` list methods internally and must keep the server-local base, so a service-level conversion would corrupt updates. - **CSV**: exported values stay server-local; both headers now name the zone they are written in — `Created At (UTC+08:00)` — the audit CSV's labeling approach. - `lastHeartbeat` is untouched: it is client-reported, not a stored `rmq_group` stamp. ### How Did You Test This Change ``` cd server mvn -B -ntp test -Dtest='TopicControllerTest,ConsumerGroupControllerTest,MetadataServiceTest' -Dsurefire.failIfNoSpecifiedTests=false Tests run: 103, Failures: 0, Errors: 0, Skipped: 0 BUILD SUCCESS cd web npx vitest run src/pages/instance/__tests__/TopicPage.test.tsx src/pages/instance/__tests__/ConsumerPage.test.tsx Test Files 2 passed (2) Tests 100 passed (100) ``` New tests: `listTopicsShouldSerializeTimestampsAsUtcWallTimeTest` / `listConsumerGroupsShouldSerializeTimestampsAsUtcWallTimeTest` (stored 10:00 under Asia/Shanghai serializes as `2026-08-01T02:00:00` on the JSON wire), `exportTopicsShouldNameTheZoneOfTheTimestampColumnsTest`, and viewer-zone rendering tests for both pages with `TZ` stubbed to Asia/Shanghai. ### 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 and labeled CSV headers) -- 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]
