From 2dc17f3aa7baa45b861c2ec20f0089ded5acbf7b Mon Sep 17 00:00:00 2001 From: Andres Date: Sat, 28 Jun 2025 15:43:48 +0200 Subject: [PATCH] fix game duration --- src/app/(home)/log-parser/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/(home)/log-parser/page.tsx b/src/app/(home)/log-parser/page.tsx index f061aa1..ae87545 100644 --- a/src/app/(home)/log-parser/page.tsx +++ b/src/app/(home)/log-parser/page.tsx @@ -852,9 +852,9 @@ export default function LogParser() { lastEventTime ?? lastProcessedTimestamp ?? currentGame.startDate // Fallback chain } currentGame.durationSeconds = currentGame.endDate - ? (currentGame.endDate instanceof Date + ? ((currentGame.endDate instanceof Date ? currentGame.endDate.getTime() - : new Date(currentGame.endDate).getTime() - + : new Date(currentGame.endDate).getTime()) - currentGame.startDate.getTime()) / 1000 : null games.push(currentGame)