Skip to content

Commit

Permalink
Merge pull request #8411 from Sesquipedalian/3.0/event_create_utc_pos…
Browse files Browse the repository at this point in the history
…itive_offset

Always compares in UTC in SMF\Calendar\RecurrenceIterator::calculate()
  • Loading branch information
Sesquipedalian authored Jan 19, 2025
2 parents f22621b + 5085bc1 commit 2fc6659
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Calendar/RecurrenceIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -891,8 +891,8 @@ private function calculate(): void
$this->limitBySetPos();

// Final cleanup.
$view_start = $this->view_start->format($this->record_format);
$view_end = $this->view_end->format($this->record_format);
$view_start = (clone $this->view_start)->setTimezone(new \DateTimeZone('UTC'))->format($this->record_format);
$view_end = (clone $this->view_end)->setTimezone(new \DateTimeZone('UTC'))->format($this->record_format);

$this->occurrences = array_values(array_filter(
$this->occurrences,
Expand Down

0 comments on commit 2fc6659

Please sign in to comment.