Fix Time formatting Function

This commit is contained in:
Neshura 2024-04-22 20:02:47 +02:00
parent c116aa8c47
commit 115d30dc67
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C

View file

@ -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)}`