fix: 全站时间统一为北京时间(Asia/Shanghai)

新增 src/utils/datetime.ts 共享 formatBjTime 工具,
13 个页面(11后台+2前台) 的 toLocaleString/formatDate
改为显式北京时间。Dashboard.tsx 保留图表标签的
formatDate(split) 不受影响。
This commit is contained in:
QihuAI Design committed 2026-07-16 12:39:35 +08:00
1 parent 82afe14a23
commit b3866f770c
12 files changed
+34 -19

No files matched your search

+2 -1
View File
@@ -1,5 +1,6 @@
import { useState, useEffect, useCallback } from 'react';
import './Developer.css';
import { formatBjTime } from '@/utils/datetime';
const API_BASE = '/app/api';
@@ -216,7 +217,7 @@ export default function AdminDeveloper() {
const fmtTime = (t: string | null) => {
if (!t) return '-';
try { return new Date(t).toLocaleString('zh-CN'); } catch { return t; }
try { return formatBjTime(t); } catch { return t; }
};
const statusBadge = (status: string) => {