From 04e9d3a3ef645413eef7ada6591c6e0bcadc0b4e Mon Sep 17 00:00:00 2001 From: hh <2587203630@qq.com> Date: Wed, 15 Jul 2026 21:49:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E6=95=85=E4=BA=8B?= =?UTF-8?q?=E6=9D=BF=E5=8E=86=E5=8F=B2=E6=97=B6=E9=97=B4=E6=97=B6=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/frontend/src/routes/pipeline.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/core/frontend/src/routes/pipeline.tsx b/core/frontend/src/routes/pipeline.tsx index 2243ce2..4d1035d 100644 --- a/core/frontend/src/routes/pipeline.tsx +++ b/core/frontend/src/routes/pipeline.tsx @@ -45,6 +45,20 @@ function generationTaskErrorText(error: unknown, fallback: string): string { const presentation = presentGenerationError(error); return `${presentation.title}:${presentation.description}`; } + +// API 时间统一以 UTC ISO 字符串返回;项目工作台固定按中国时区展示,避免直接截取 UTC 的 HH:mm。 +function formatShanghaiClock(iso?: string): string { + if (!iso) return "--:--"; + const date = new Date(iso); + if (Number.isNaN(date.getTime())) return "--:--"; + return new Intl.DateTimeFormat("zh-CN", { + timeZone: "Asia/Shanghai", + hour: "2-digit", + minute: "2-digit", + hourCycle: "h23", + }).format(date); +} + // 毫秒 → mm:ss(时间轴 / 字幕展示) function fmtMs(ms: number): string { const total = Math.max(0, Math.round(ms / 1000)); @@ -3374,7 +3388,7 @@ export function PipelinePage(props: { return (
setSbViewVerId(ver.id)} onKeyDown={(event) => { if (event.key === "Enter" || event.key === " ") { event.preventDefault(); setSbViewVerId(ver.id); } }}>
{isAdopted ? "采用" : "历史"}
-
{(ver.created_at || "").slice(11, 16) || "--:--"}
+
{formatShanghaiClock(ver.created_at)}
); }) : // 本场暂无历史}