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)}
); }) : // 本场暂无历史}