diff --git a/webapp/src/Service/ScoreboardService.php b/webapp/src/Service/ScoreboardService.php index 0f345a6bb8..4ed22f3dc2 100644 --- a/webapp/src/Service/ScoreboardService.php +++ b/webapp/src/Service/ScoreboardService.php @@ -328,6 +328,8 @@ public function calculateScoreRow( $runtimeJury = PHP_INT_MAX; $runtimePubl = PHP_INT_MAX; + $contestStartTime = $contest->getStarttime(); + foreach ($submissions as $submission) { /** @var Judging|ExternalJudgement|null $judging */ if ($useExternalJudgements) { @@ -402,6 +404,8 @@ public function calculateScoreRow( // STEP 3: $absSubmitTime = (float)$submission->getSubmittime(); + // Negative numbers don't make sense on the scoreboard, cap them to the contest start. + $absSubmitTime = max($absSubmitTime, $contestStartTime); $submitTime = $contest->getContestTime($absSubmitTime); if ($judging->getResult() == Judging::RESULT_CORRECT) {