Skip to content

Commit abf80fa

Browse files
KevinjilmeisterT
authored andcommitted
Fix updating freeze and end time from event-feed
Previously, the freeze and end times of contests would be set as timestamps. However, the `updateTimes` method overwrites the values from their string representation on update. Therefore, the requested update was not persisted in the database.
1 parent a485000 commit abf80fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

webapp/src/Service/ExternalContestSourceService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,8 +748,8 @@ protected function validateAndUpdateContest(Event $event, EventData $data): void
748748
$toCheck = [
749749
'start_time_enabled' => true,
750750
'start_time_string' => $startTime->format('Y-m-d H:i:s ') . $timezoneToUse,
751-
'end_time' => $contest->getAbsoluteTime($fullDuration),
752-
'freeze_time' => $contest->getAbsoluteTime($fullFreeze),
751+
'end_time_string' => preg_replace('/\.000$/', '', $fullDuration),
752+
'freeze_time_string' => preg_replace('/\.000$/', '', $fullFreeze),
753753
];
754754
} else {
755755
$toCheck = [

0 commit comments

Comments
 (0)