89799969 opened a new issue, #4221:
URL: https://github.com/apache/rocketmq-dashboard/issues/4221

   ## Problem
   
   `MessageQueryHistoryDrawer` formats `queriedAt` / `latestQueryAt` with `new 
Date(value).toLocaleString()`. Backend `QueryHistoryService` stamps those 
fields with `Clock.systemUTC()` into a `LocalDateTime`, which serializes 
without a zone offset (`2026-08-05T12:00:00`). The browser therefore treats the 
value as **local** time and shifts the displayed timestamp by the viewer offset.
   
   This is the same class of bug as the alert rule `lastTriggered` display 
issue (#4174 / #4199), but on the query-history surface.
   
   ## Evidence
   
   - `web/src/components/MessageQueryHistoryDrawer.tsx` `formatTime` uses 
`toLocaleString()`.
   - Backend: `QueryHistoryService` uses `Clock.systemUTC()`; VOs expose 
`LocalDateTime queriedAt` / `latestQueryAt` with no offset.
   - Existing helper: `formatUtcDateTime` in `web/src/utils/format.ts` already 
appends `Z` for offset-less UTC strings and formats in the viewer timezone.
   
   ## Expected behavior
   
   Query history timestamps are rendered as UTC-instant values in the viewer's 
timezone (via `formatUtcDateTime`), not as browser-local naive datetimes.
   
   ## Scope
   
   Frontend drawer formatting + unit test. No API 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