fix game duration

This commit is contained in:
2025-06-28 15:43:48 +02:00
parent 0452e6fae9
commit 2dc17f3aa7

View File

@@ -852,9 +852,9 @@ export default function LogParser() {
lastEventTime ?? lastProcessedTimestamp ?? currentGame.startDate // Fallback chain lastEventTime ?? lastProcessedTimestamp ?? currentGame.startDate // Fallback chain
} }
currentGame.durationSeconds = currentGame.endDate currentGame.durationSeconds = currentGame.endDate
? (currentGame.endDate instanceof Date ? ((currentGame.endDate instanceof Date
? currentGame.endDate.getTime() ? currentGame.endDate.getTime()
: new Date(currentGame.endDate).getTime() - : new Date(currentGame.endDate).getTime()) -
currentGame.startDate.getTime()) / 1000 currentGame.startDate.getTime()) / 1000
: null : null
games.push(currentGame) games.push(currentGame)