From 14e70b56bb52b460d4d15be869c33ebed86d1cc3 Mon Sep 17 00:00:00 2001 From: hailin Date: Mon, 2 Feb 2026 19:42:13 -0800 Subject: [PATCH] =?UTF-8?q?fix(c2c-bot):=20=E6=B0=B4=E5=8D=95=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E6=97=B6=E9=97=B4=E8=BD=AC=E6=8D=A2=E4=B8=BA=E5=8C=97?= =?UTF-8?q?=E4=BA=AC=E6=97=B6=E9=97=B4=20(UTC+8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题:水单上的完成时间显示 UTC 时间(如 03:38:40),实际北京时间为 11:38:40。 原因:toISOString() 始终返回 UTC 时间。 修复:手动加 8 小时偏移量,将 UTC 转换为北京时间后再格式化。 Co-Authored-By: Claude Opus 4.5 --- .../src/application/services/payment-proof.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/services/trading-service/src/application/services/payment-proof.service.ts b/backend/services/trading-service/src/application/services/payment-proof.service.ts index 924d54ea..fac24d71 100644 --- a/backend/services/trading-service/src/application/services/payment-proof.service.ts +++ b/backend/services/trading-service/src/application/services/payment-proof.service.ts @@ -40,7 +40,9 @@ export class PaymentProofService { } private buildSvg(data: ProofData): string { - const time = data.completedAt.toISOString().replace('T', ' ').slice(0, 19); + // toISOString() 返回 UTC,手动加 8 小时转北京时间 + const beijingDate = new Date(data.completedAt.getTime() + 8 * 60 * 60 * 1000); + const time = beijingDate.toISOString().replace('T', ' ').slice(0, 19); return `