Repository navigation
Conversation
getDtEnd() added the duration in seconds with modify(), which uses the clock time. Across a DST transition, the end was wrong. With DTEND, each instance now has the exact duration of the master event. With DURATION, the nominal duration is added to each start, as RFC 5545, section 3.8.5.3, requires. Fixes sabre-io#818.
Add winter time cases for P1D and PT24H, a mixed P1DT2H case, and floating and all-day events with a reference timezone.
EventIterator passed the raw RDATE values to RDateIterator, which parsed them in the timezone of DTSTART. The TZID of an RDATE had no effect. EventIterator now uses getDateTimes(), as for EXDATE, and sorts the dates. RDateIterator accepts DateTimeInterface values and gives them in the timezone of the start date. An RDATE without TZID still uses the timezone of DTSTART. RDATE with VALUE=PERIOD keeps the old behaviour. Fixes sabre-io#819.
jvelo
force-pushed
the
fix/rdate-tzid
branch
from
November 26, 2026 14:55
e740a7b to
994ae99
Compare
jvelo
marked this pull request as ready for review
November 26, 2026 15:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #819.
Depends on #820. This branch contains the commits of #820. Merge #820 first. Without it, an
RDATEin UTC that this PR moves to the timezone ofDTSTARTgets a wrong end when the instance crosses a DST transition.EventIteratorpassed the rawRDATEvalues toRDateIterator, which parsed them in the timezone ofDTSTART. TheTZIDof anRDATEhad no effect, so the instance started at the wrong time.EventIteratornow reads theRDATEproperties withgetDateTimes(), as it already does forEXDATE. EachTZIDis used. AnRDATEwithoutTZIDstill uses the timezone ofDTSTART.RDATEproperties in different timezones can be out of order once converted, so the dates are sorted.RDateIteratoracceptsDateTimeInterfacevalues in addition to strings, and gives them in the timezone of the start date.RDATE;VALUE=PERIODkeeps the current behaviour (see RDATE PERIOD with TZID doesn't seem to be recognised #601).Related: #347 and #716 (
RDATEtogether withRRULE) are separate.Tests
RDateTimezoneTestcovers oneRDATEwith aTZID, severalRDATEproperties in different timezones (checking the order after conversion), UTC with aTZID, noTZID, and all-day dates.RDateIteratorTestcoversDateTimeInterfacevalues.testEndAcrossDstchecks that a UTCRDATEkeeps the exact duration of the event across DST; it fails without #820. Without the change, the 5 new cases aboutTZIDfail; the other 2 check that nothing else changes. The full suite, phpstan and php-cs-fixer pass.