aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/vobject/lib/ITip/Broker.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/vobject/lib/ITip/Broker.php')
-rw-r--r--vendor/sabre/vobject/lib/ITip/Broker.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/vendor/sabre/vobject/lib/ITip/Broker.php b/vendor/sabre/vobject/lib/ITip/Broker.php
index 80d9a5b31..dbdd80b78 100644
--- a/vendor/sabre/vobject/lib/ITip/Broker.php
+++ b/vendor/sabre/vobject/lib/ITip/Broker.php
@@ -338,7 +338,10 @@ class Broker
// Finding all the instances the attendee replied to.
foreach ($itipMessage->message->VEVENT as $vevent) {
- $recurId = isset($vevent->{'RECURRENCE-ID'}) ? $vevent->{'RECURRENCE-ID'}->getValue() : 'master';
+ // Use the Unix timestamp returned by getTimestamp as a unique identifier for the recurrence.
+ // The Unix timestamp will be the same for an event, even if the reply from the attendee
+ // used a different format/timezone to express the event date-time.
+ $recurId = isset($vevent->{'RECURRENCE-ID'}) ? $vevent->{'RECURRENCE-ID'}->getDateTime()->getTimestamp() : 'master';
$attendee = $vevent->ATTENDEE;
$instances[$recurId] = $attendee['PARTSTAT']->getValue();
if (isset($vevent->{'REQUEST-STATUS'})) {
@@ -351,7 +354,8 @@ class Broker
// all the instances where we have a reply for.
$masterObject = null;
foreach ($existingObject->VEVENT as $vevent) {
- $recurId = isset($vevent->{'RECURRENCE-ID'}) ? $vevent->{'RECURRENCE-ID'}->getValue() : 'master';
+ // Use the Unix timestamp returned by getTimestamp as a unique identifier for the recurrence.
+ $recurId = isset($vevent->{'RECURRENCE-ID'}) ? $vevent->{'RECURRENCE-ID'}->getDateTime()->getTimestamp() : 'master';
if ('master' === $recurId) {
$masterObject = $vevent;
}
@@ -398,7 +402,10 @@ class Broker
$newObject = $recurrenceIterator->getEventObject();
$recurrenceIterator->next();
- if (isset($newObject->{'RECURRENCE-ID'}) && $newObject->{'RECURRENCE-ID'}->getValue() === $recurId) {
+ // Compare the Unix timestamp returned by getTimestamp with the previously calculated timestamp.
+ // If they are the same, then this is a matching recurrence, even though its date-time may have
+ // been expressed in a different format/timezone.
+ if (isset($newObject->{'RECURRENCE-ID'}) && $newObject->{'RECURRENCE-ID'}->getDateTime()->getTimestamp() === $recurId) {
$found = true;
}
--$iterations;