tju-yxq opened a new pull request, #5588:
URL: https://github.com/apache/rocketmq-dashboard/pull/5588
### Which Issue(s) This PR Fixes
- Fixes #5587
### Brief Description
Aligns the two DLQ timestamp conversions with the app-wide zoneless-UTC
contract:
- **`RocketMQDLQProvider.java`**: the group list's `lastEnqueueTime`
converts the broker's epoch via `ZoneOffset.UTC` instead of
`ZoneId.systemDefault()`.
- **`DLQMessageExcelRow.java`**: the export's "Store Time" column converts
via `ZoneOffset.UTC`.
- **`DLQMessageExcelRowTest.java`**: adds a regression test that renders the
export under two different JVM default zones (Asia/Shanghai,
America/Los_Angeles) and asserts the column stays `2023-11-14 22:13:20` for the
fixed epoch `1_700_000_000_000L` (2023-11-14T22:13:20Z), restoring the original
zone afterwards.
No behavior change on a UTC-JVM deployment; on non-UTC JVMs the DLQ times
now agree with the alert, silence, outbox, and session times.
### How Did You Test This Change?
```
cd server && mvn test
-Dtest="DLQMessageExcelRowTest,RocketMQDLQProviderTest,DLQControllerTest"
[INFO] BUILD SUCCESS # exit 0 — includes the new
shouldRenderStoreTimeAsUtcRegardlessOfJvmZoneTest
(Asia/Shanghai
and America/Los_Angeles default zones both yield
2023-11-14 22:13:20 for the fixed epoch)
```
### Checklist
- [x] One coherent change; unrelated modifications are not bundled in (one
contract — zoneless DLQ times are UTC — two conversion sites plus their
regression test)
- [x] Commit subject follows Conventional Commits
- [x] Tests added or updated for non-trivial changes, test methods named
`...Test` (new `shouldRenderStoreTimeAsUtcRegardlessOfJvmZoneTest`)
- [x] New UI text has both Chinese and English entries under `web/src/i18n/`
(no UI text change)
- [x] Architecture constraints stay green (`mvn test` on the DLQ suites
passes; no ArchUnit-relevant changes)
- [x] New source files carry the ASF license header (no new source files)
- [ ] Documentation touched where behaviour changed (timestamp base
alignment only)
--
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]