Skip to content

Commit 661cafe

Browse files
meisterTeldering
authored andcommitted
Allow for ms precision in contest start time.
Also explain why we are stripping off .000.
1 parent b3811b5 commit 661cafe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

webapp/src/Service/ExternalContestSourceService.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,9 +749,10 @@ protected function validateAndUpdateContest(Event $event, EventData $data): void
749749
[$feedTimezone->getName(), $ourTimezone->getName()]
750750
);
751751
}
752+
// We do use precise time with milliseconds if provided, but strip trailing .000 off to make it look nicer.
752753
$toCheck = [
753754
'start_time_enabled' => true,
754-
'start_time_string' => $startTime->format('Y-m-d H:i:s ') . $timezoneToUse,
755+
'start_time_string' => preg_replace('/\.000$/', '', $startTime->format('Y-m-d H:i:s.v')) . ' ' . $timezoneToUse),
755756
'end_time_string' => preg_replace('/\.000$/', '', $fullDuration),
756757
'freeze_time_string' => preg_replace('/\.000$/', '', $fullFreeze),
757758
];

0 commit comments

Comments
 (0)