Skip to content

Commit

Permalink
Fix updating freeze and end time from event-feed
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Kevinjil authored and meisterT committed Apr 21, 2024
1 parent 9f44e13 commit 6dfbe1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webapp/src/Service/ExternalContestSourceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -748,8 +748,8 @@ protected function validateAndUpdateContest(Event $event, EventData $data): void
$toCheck = [
'start_time_enabled' => true,
'start_time_string' => $startTime->format('Y-m-d H:i:s ') . $timezoneToUse,
'end_time' => $contest->getAbsoluteTime($fullDuration),
'freeze_time' => $contest->getAbsoluteTime($fullFreeze),
'end_time_string' => preg_replace('/\.000$/', '', $fullDuration),
'freeze_time_string' => preg_replace('/\.000$/', '', $fullFreeze),
];
} else {
$toCheck = [
Expand Down

0 comments on commit 6dfbe1e

Please sign in to comment.