Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event recurrences appear twice if moved #341

Open
sergentrif opened this issue Sep 12, 2024 · 0 comments
Open

Event recurrences appear twice if moved #341

sergentrif opened this issue Sep 12, 2024 · 0 comments

Comments

@sergentrif
Copy link

sergentrif commented Sep 12, 2024

PHP Version

8.3

PHP date.timezone

Europe/Paris

ICS Parser Version

3.4

Operating System

Mac

Description

I moved the recurrence of an event and now this recurrence appears twice in the events that are loaded.

It first appears on the correct date (the last, after moving), but it still appears on its initial date.

My event is as follows

BEGIN:VEVENT
DTSTART;TZID=Europe/Paris:20240910T140000
DTEND;TZID=Europe/Paris:20240910T173000
DTSTAMP:20240912T131820Z
UID:FAKE-UID
RECURRENCE-ID;TZID=Europe/Paris:20240911T090000
CREATED:20240311T155453Z
LAST-MODIFIED:20240911T162406Z
SEQUENCE:3
STATUS:CONFIRMED
SUMMARY: FAKE-NAME
TRANSP:OPAQUE
CATEGORIES:2
END:VEVENT

Lines 1307 and 1308 of the ICal.php file seem suspicious to me, as they imply that we're going to replace the DTSTART date of the recurrence with the date contained in the RECURRENCE-ID field.

protected function processEvents()
{
    ...        
    $recurrenceDateUtc = $this->iCalDateToUnixTimestamp($anEvent['RECURRENCE-ID_array'][3]);
    $this->alteredRecurrenceInstances[$uid][$key] = $recurrenceDateUtc;
    ...
}

However, this initial date is now just an ID, since the recurrence has been moved. Even if these lines are modified, the problem remains. No matter how hard I try, I have to admit that I'm powerless to fix this bug.

Steps to Reproduce

You can use the following event

BEGIN:VEVENT
DTSTART;TZID=Europe/Paris:20240910T140000
DTEND;TZID=Europe/Paris:20240910T173000
DTSTAMP:20240912T131820Z
UID:FAKE-UID
RECURRENCE-ID;TZID=Europe/Paris:20240911T090000
CREATED:20240311T155453Z
LAST-MODIFIED:20240911T162406Z
SEQUENCE:3
STATUS:CONFIRMED
SUMMARY: FAKE-NAME
TRANSP:OPAQUE
CATEGORIES:2
END:VEVENT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant