Skip to content

Commit

Permalink
Merge pull request #887 from PennyDreadfulMTG/more-date-snafu
Browse files Browse the repository at this point in the history
Compare DateTimeImmutable with DateTimeImmutable, not with string
  • Loading branch information
bakert authored Jan 18, 2025
2 parents 2e0d7e8 + 51163ab commit fecd0cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gatherling/Views/Pages/EventList.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ public function __construct(string $seriesName, string $format, ?int $season)
'standingsLink' => "{$baseLink}standings",
'structureSummary' => (new Event($event->name))->structureSummary(),
];
if (!$event->active && !$event->finalized && $event->start <= new DateTimeImmutable('+1 hour')) {
if (!$event->active && !$event->finalized && $eventInfo['start'] <= new DateTimeImmutable('+1 hour')) {
$pendingEvents[] = $eventInfo;
} elseif ($event->active == 1) {
$activeEvents[] = $eventInfo;
} elseif ($event->start > new DateTimeImmutable('+1 hour')) {
} elseif ($eventInfo['start'] > new DateTimeImmutable('+1 hour')) {
$upcomingEvents[] = $eventInfo;
} else {
$pastEvents[] = $eventInfo;
Expand Down

0 comments on commit fecd0cd

Please sign in to comment.