fix(paper): 模拟盘列表创建时间UTC转北京时间显示(存的是UTC isoformat,直接截串少8h) [nas]
CI/CD / test (push) Successful in 17s
CI/CD / nas-deploy (push) Successful in 27s
CI/CD / nas-verify (push) Successful in 11s

This commit is contained in:
2026-08-14 14:34:58 +08:00
parent 36db2ed5a6
commit 102f602aee
+5 -1
View File
@@ -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}`)