fix: 全站时间统一为北京时间(Asia/Shanghai)
新增 src/utils/datetime.ts 共享 formatBjTime 工具, 13 个页面(11后台+2前台) 的 toLocaleString/formatDate 改为显式北京时间。Dashboard.tsx 保留图表标签的 formatDate(split) 不受影响。
This commit is contained in:
1 parent
82afe14a23
commit
b3866f770c
12 files changed
+34
-19
No files matched your search
@@ -4,6 +4,7 @@ import type { EvolutionSkill, EvolutionEvent, EvolutionProfile, SkillTreeData, S
|
||||
import html2canvas from 'html2canvas';
|
||||
import jsPDF from 'jspdf';
|
||||
import './EvolutionDashboard.css';
|
||||
import { formatBjTime } from '@/utils/datetime';
|
||||
|
||||
// ==================== SVG Icons ====================
|
||||
const Icon: React.FC<{ children: React.ReactNode; size?: number; className?: string }> = ({ children, size = 16, className }) => (
|
||||
@@ -486,7 +487,7 @@ const TimelinePanel: React.FC<{
|
||||
<p className="evo-timeline-desc">{event.description}</p>
|
||||
<div className="evo-timeline-time">
|
||||
<Icon size={12}><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></Icon>
|
||||
{new Date(event.created_at).toLocaleString()}
|
||||
{formatBjTime(event.created_at)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user