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
@@ -3,6 +3,7 @@ import React, { useState, useEffect, useCallback } from 'react';
import {
adminAPI,
} from '@/api';
import { formatBjTime } from '@/utils/datetime';
// Platform icons (simple SVG representations)
const platformIcons: Record<string, string> = {
@@ -329,7 +330,7 @@ const ImBots: React.FC = () => {
// Format time
const formatTime = (time: string) => {
if (!time) return '-';
return new Date(time).toLocaleString('zh-CN');
return formatBjTime(time);
};
const tabs: { key: Tab; label: string; icon: string }[] = [