Commit bccc8998 authored by Glen Ditchfield's avatar Glen Ditchfield 🐛
Browse files

Add time and time zone to EXDATEs of DATE-TIME instances

KOrganizer creates DATE values for exceptions to recurring
instances, even if the incidence is not "all day" (i.e. DTSTART is a
DATE-TIME value).  EXDATE identifies a specific instance and arguably
should follow the same rules as RECURRENCE-ID.  RFC 5545 does not say
so, but [erratum 6316](https://www.rfc-editor.org/errata/eid6316) does.
In practice, other important systems reject EXDATEs that do not match
DTSTART.

Original patch written by Jochen.Trumpf@anu.edu.au.

BUG: 169336
BUG: 434559
FIXED-IN: 5.17.0
parent ab0dd36d
Pipeline #55463 passed with stage
in 11 minutes and 38 seconds
......@@ -2294,6 +2294,7 @@ bool CalendarView::deleteIncidence(const Akonadi::Item &item, bool force)
}
}
KCalendarCore::Incidence::Ptr oldIncidence(incidence->clone());
KCalendarCore::Recurrence *recur = incidence->recurrence();
switch (km) {
case KMessageBox::Ok: // Continue // all
case KMessageBox::Continue:
......@@ -2301,12 +2302,17 @@ bool CalendarView::deleteIncidence(const Akonadi::Item &item, bool force)
break;
case KMessageBox::Yes: // just this one
incidence->recurrence()->addExDate(itemDate);
if (recur->allDay()) {
recur->addExDate(itemDate);
} else {
auto itemDateTime = recur->startDateTime();
itemDateTime.setDate(itemDate);
recur->addExDateTime(itemDateTime);
}
mChanger->modifyIncidence(item, oldIncidence, this);
break;
case KMessageBox::No: // all future items
KCalendarCore::Recurrence *recur = incidence->recurrence();
recur->setEndDate(itemDate.addDays(-1));
mChanger->modifyIncidence(item, oldIncidence, this);
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment