[3.0] feat(ics)!: always name resolvable timezones (align with Google Calendar) - #256
Open
Prakashdahal2005 wants to merge 1 commit into
Open
[3.0] feat(ics)!: always name resolvable timezones (align with Google Calendar)#256Prakashdahal2005 wants to merge 1 commit into
Prakashdahal2005 wants to merge 1 commit into
Conversation
…ecurring - Simplify shouldNameTimezones() to emit TZID + VTIMEZONE for every timed event with a resolvable zone, dropping the RRULE gate - Remove observesAChange() and its memoization - Update test assertions and snapshots to match v3.0 output BREAKING CHANGE: DTSTART/DTEND are now local times with a TZID parameter and an accompanying VTIMEZONE block for all resolvable-zone events. Previously only recurring events in DST-observing zones received this treatment; all others were flattened to UTC instants with a trailing Z.
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
This PR resolves #255 by refactoring the
Icsgenerator to always name resolvable timezones for non-all-day events, bringing its behavior into full alignment withGoogle::generate().Previously in v2.x,
Icsonly named timezones if anRRULEwas attached or if the timezone observed daylight saving changes (observesAChange()), flattening other single-zone events to UTC instants (DTSTART:20260323T080000Z). Under v3.0, all resolvable non-all-day events write local times withTZIDand output aVTIMEZONEblock.Key Changes
src/Generators/Ics.php):shouldNameTimezones()now directly returns! $link->allDay && $link->hasResolvableTimezones().observesAChange()and its memoization array$observedChanges.tests/Generators/IcsGeneratorTest.php): Updated legacy v2.0 unit test assertions that previously expected plain UTC instants.TZIDandVTIMEZONEstructures.Breaking Change Notice
This is targeted for v3.0:
DTSTARTandDTENDfor resolvable non-all-day events output local times withTZIDparameters instead of UTC instants with aZsuffix.VTIMEZONEcomponent for resolvable zones.Verification
234 tests, 484 assertions— 100% PASS