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

   ### Which Issue(s) This PR Fixes
   
   - Fixes #6532
   
   ### Brief Description
   
   The Excel export formatted the store time as the server-zone wall clock with 
no zone in the cell (a compile-time `@ExcelProperty("Store Time")` header), 
while the console renders the same epoch in the viewer's zone, so the two views 
of the same message silently disagreed whenever the zones differed (a `TZ=UTC` 
container viewed from UTC+8). The cell is now formatted through `ZonedDateTime` 
with an offset suffix (`yyyy-MM-dd HH:mm:ss XXX`, e.g. `2023-11-15 06:13:20 
+08:00`), the offset the zone rules hold at that instant, matching the labeled 
timestamp column of the audit CSV export. The header constant stays untouched.
   
   ### How Did You Test This Change
   
   ```
   cd server
   mvn -B -ntp test -Dtest=DLQMessageExcelRowTest 
-Dsurefire.failIfNoSpecifiedTests=false
   [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0 -- in 
org.apache.rocketmq.studio.instance.dlq.DLQMessageExcelRowTest
   [INFO] BUILD SUCCESS
   ```
   
   Added `shouldNameTheZoneOfTheStoreTimeItFormatsTest`: writes one message 
with `storeTime = 1_700_000_000_000`, reads the `Store Time` cell back from the 
exported sheet and asserts it equals the server-zone wall clock plus 
`ZoneId.systemDefault().getRules().getOffset(instant)` — on a CST machine 
`2023-11-15 06:13:20 +08: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)


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