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

   ### Before Creating the Bug Report
   
   - [x] I have searched the [open 
issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository 
and believe that this is not a duplicate.
   
   - [x] This is a defect in RocketMQ Studio, not a usage question and not a 
defect in another Apache RocketMQ repository.
   
   - [x] I can reproduce this on the current `master` branch, or I have stated 
the exact version I am running below.
   
   
   ### Studio Version
   
   branch: rocketmq-studio
   git commit id: a92c2314 fix(settings): resolve data source type aliases to 
their own backend probe (#6489)
   deployed as: built from source (web/ dev server against server/ + MySQL)
   
   ### Runtime Environment
   
   OS: Windows 11 24H2
   browser: Chromium (the console served by the Vite dev server)
   MySQL: 8.x container (host port 13306)
   
   ### Connected RocketMQ Cluster
   
   RocketMQ version: 5.3.2 (docker), access mode: direct to NameServer/Broker; 
not needed to reproduce - the metrics panel and its stored history render 
without a metrics data source
   
   ### Build Toolchain
   
   Node.js 20.19.5, TypeScript from web/package.json
   
   ### Describe the Bug
   
   The Metrics Explorer prints every instant it shows with 
Date.toLocaleString(locale): the info popover's 查询窗口 / 查询时间 / 最早样本 / 最新样本, the 
sample column of its table, the 指标查询历史 modal and the details panel. The same 
stored instant therefore reads 2027/1/15 15:00:00 in the Chinese console and 
1/15/2027, 3:00:00 PM in the English one, while every other timestamp surface 
in the console prints the stable YYYY-MM-DD HH:mm:ss the shared formatter 
produces (A recent merge, #6479, changed exactly this for the LiteTopic 
instants; #5225/#4234/#4221 did it for other pages).
   
   Two helpers carry it, both in web/src/components/MetricsExplorer.tsx 
(formatSeconds at :1021 and formatMillis at :1026): they are named by their 
unit - epoch seconds and epoch milliseconds - and both end in new 
Date(...).toLocaleString(locale).
   
   ### Steps to Reproduce
   
   1. Open 监控面板 (/ops/dashboard).
   2. Run any metric query, then open the info popover next to the 
series/sample line (the button labelled "<metric> 查询窗口").
   3. Or open 查询历史 (the clock button) with any stored entry and read the 
range/time strings.
   
   ### What Did You Expect to See?
   
   The instants printed the way the rest of the console prints them: a stable 
YYYY-MM-DD HH:mm:ss in the viewer's zone, independent of the UI language.
   
   ### What Did You See Instead?
   
   Locale-dependent strings that change with the console language:
   - Chinese: 2027/1/15 15:00:00
   - English: 1/15/2027, 3:00:00 PM
   
   instead of 2027-01-15 15:00:00.
   
   ### Additional Context
   
   Reproduced on a92c2314 with the console served from web/ and one entry 
seeded into the metrics history (localStorage key 
rocketmq-studio-metrics-query-history, queriedAt 1800000000000, window 
1799996400-1800000000). The 指标查询历史 modal renders the entry's range and query 
time through those helpers, so the same instant changes shape with the UI 
language. Screenshot of the fixed build for comparison: 2027-01-15 15:00:00 - 
2027-01-15 16:00:00 · 2027-01-15 16:00:00.
   
   Other surfaces using the same pair of helpers and therefore the same format: 
the sample column of the result table, the first/last sample lines of the 
popover, the history entry line at MetricsExplorer.tsx:1599 and the details 
panel at :1641.
   
   ### Are You Willing to Submit a Pull Request?
   
   - [x] Yes, I am willing to submit a pull request.


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