From a03239ec612234d6fd97e8b367c242f5cf86bff3 Mon Sep 17 00:00:00 2001 From: snowykami Date: Sat, 5 Oct 2024 09:25:07 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E4=BF=AE=E5=A4=8D=E6=B5=AE?= =?UTF-8?q?=E7=82=B9=E6=95=B0=E4=BF=9D=E7=95=99=E4=BD=8D=E6=95=B0=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/utils.ts b/src/api/utils.ts index 8d63852..22c5e8d 100644 --- a/src/api/utils.ts +++ b/src/api/utils.ts @@ -118,6 +118,6 @@ export function formatDuration(duration: number): string { const d = Math.floor(duration / 86400); const h = Math.floor((duration % 86400) / 3600); const m = Math.floor((duration % 3600) / 60); - const s = duration % 60; + const s = Math.floor(duration % 60); return d > 0 ? `${d}d` : h > 0 ? `${h}h` : m > 0 ? `${m}m` : `${s}s`; } \ No newline at end of file