fix(paper): 模拟盘列表创建时间UTC转北京时间显示(存的是UTC isoformat,直接截串少8h) [nas]
This commit is contained in:
@@ -69,7 +69,11 @@ function symbolsShort(s: string | undefined): string {
|
||||
const typeLabel: Record<string, string> = { cta: '个股', portfolio: '组合' }
|
||||
function createdShort(v: string | undefined): string {
|
||||
if (!v) return '—'
|
||||
return v.replace('T', ' ').slice(0, 16)
|
||||
// created_at 存 UTC isoformat → 转北京时间显示
|
||||
const d = new Date(v)
|
||||
if (Number.isNaN(d.getTime())) return v.replace('T', ' ').slice(0, 16)
|
||||
return new Date(d.getTime() + 8 * 3600 * 1000)
|
||||
.toISOString().replace('T', ' ').slice(0, 16)
|
||||
}
|
||||
function open(a: PaperAccount): void {
|
||||
router.push(a.mode === 'replay' ? `/paper/result/${a.id}` : `/paper/live/${a.id}`)
|
||||
|
||||
Reference in New Issue
Block a user