From 115d30dc67fc8a8dd4443ee60f598bc4b839d98b Mon Sep 17 00:00:00 2001 From: Neshura Date: Mon, 22 Apr 2024 20:02:47 +0200 Subject: [PATCH] Fix Time formatting Function --- src/routes/+page.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 5e1527d..08889f8 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -139,8 +139,8 @@ function displayTime(rawSeconds: number) { const intSeconds = rawSeconds.toFixed(0); const seconds = intSeconds % 60; - const minutes = (intSeconds / 60).toFixed(0) % 60; - const hours = (intSeconds / 360).toFixed(0); + const minutes = Math.floor((intSeconds / 60)) % 60; + const hours = Math.floor((intSeconds / 3600)); if (hours == 0) { return `${minutes.toString()}:${seconds.toString().padStart(2, 0)}`