Files
Nexus/docs/changelog/2026-06-13-watch-history-beijing-time.md
2026-07-08 22:31:31 +08:00

882 B
Raw Permalink Blame History

监测历史时间显示改为北京时间

日期2026-06-13

变更摘要

监测历史页(探针记录表、资源趋势图、插槽折线 tooltip)将 API 返回的 UTC 时间按 Asia/Shanghai 格式化展示,与审计/告警等页一致。

动机

此前直接显示 UTC 的 recorded_at 原文,比北京时间少 8 小时,易误解。

涉及文件

  • frontend/src/utils/datetime.tsformatChartAxisBeijing
  • frontend/src/components/watch/WatchProbeRecordsTable.vue
  • frontend/src/components/watch/WatchTrendChart.vue
  • frontend/src/components/watch/WatchSparkline.vue
  • frontend/src/pages/WatchMetricsPage.vue

迁移 / 重启

仅前端;vite build 后生效,无需重启后端。

验证方式

cd frontend && npx vite build;打开 #/watch-metrics,探针记录「时间」列应与本地北京时间一致。