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
@@ -11,6 +11,7 @@
|
||||
import React, { useState, useEffect, useCallback } from 'react';
|
||||
|
||||
import { adminAPI } from '@/api';
|
||||
import { formatBjTime } from '@/utils/datetime';
|
||||
|
||||
|
||||
|
||||
@@ -1012,7 +1013,7 @@ const Achievement: React.FC = () => {
|
||||
|
||||
<div style={{ fontSize: '12px', color: '#8892B0', marginTop: '8px' }}>
|
||||
|
||||
完成时间: {new Date(ach.completed_at).toLocaleString('zh-CN')}
|
||||
完成时间: {formatBjTime(ach.completed_at)}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
Reference in new issue
Block a user