Bug 434599 - Exceptions to recurrence with timezones do not generate TZ-relative datetime
Summary: Exceptions to recurrence with timezones do not generate TZ-relative datetime
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: recurrence (show other bugs)
Version: 5.16.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-18 23:47 UTC by wjb
Modified: 2021-03-24 23:31 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.17.0


Attachments
An export of the invalid iCal file, whose EXDATE seems invalid (1.67 KB, text/calendar)
2021-03-18 23:47 UTC, wjb
Details
An export of the invalid iCal file, with corrected EXDATE (1.65 KB, text/calendar)
2021-03-18 23:47 UTC, wjb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wjb 2021-03-18 23:47:00 UTC
Created attachment 136832 [details]
An export of the invalid iCal file, whose EXDATE seems invalid

SUMMARY

When deleting a single occurrence of a recurring event with a timezone, thus creating an exception to a recurrence, Korganizer assigns an EXDATE using VALUE instead of TZID, apparently violating the CalDAV spec.

Some CalDAV servers reject the change. Unfortunately, the change is cached locally, so we get an inconsistent view of the calendar---other clients don't show the change.


STEPS TO REPRODUCE
1. Create a recurring event with a specific timezone, such as American/Vancouver.
2. Delete 1 occurrence of the event, creating an exception.
3. Export the event to an iCal file.

OBSERVED RESULT
On the server:
```
WARNING: Bad PUT request on '/CA4413E8-13F2-465C-B1BA-EF2420F9DDFA/1616109800.R60.ics': Failed to store item '1616109800.R60.ics' in collection '/CA4413E8-13F2-465C-B1BA-EF2420F9DDFA': can't compare offset-naive and offset-aware datetimes
```

In the iCal file, the exception will appear as:
```
EXDATE;VALUE=DATE:20210317
DTSTART;TZID=America/Vancouver:20210315T190000
DTEND;TZID=America/Vancouver:20210315T200000
```

EXPECTED RESULT

In the iCal file, the exception should appear as:
```
EXDATE;TZID=America/Vancouver:20210317T190000
DTSTART;TZID=America/Vancouver:20210315T190000
DTEND;TZID=America/Vancouver:20210315T200000
```

SOFTWARE/OS VERSIONS:
Linux 5.10.15-1-MANJARO 64bit
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

The spec suggests that if the RSTART is a TZID, the EXDATE should be too:
https://tools.ietf.org/html/rfc5545#section-3.2.19
Comment 1 wjb 2021-03-18 23:47:29 UTC
Created attachment 136833 [details]
An export of the invalid iCal file, with corrected EXDATE
Comment 2 gjditchfield 2021-03-24 22:37:53 UTC

*** This bug has been marked as a duplicate of bug 169336 ***
Comment 3 gjditchfield 2021-03-24 23:25:16 UTC
Git commit 77fd1246f391e26a3e767d575f7db302da2c6c43 by Glen Ditchfield.
Committed on 24/03/2021 at 23:14.
Pushed by gditchfield into branch 'master'.

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

The incidence editor 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.
Related: bug 169336
FIXED-IN: 5.17.0

M  +58   -9    src/incidencerecurrence.cpp
M  +1    -0    src/incidencerecurrence.h

https://invent.kde.org/pim/incidenceeditor/commit/77fd1246f391e26a3e767d575f7db302da2c6c43
Comment 4 gjditchfield 2021-03-24 23:31:56 UTC
Git commit 551d46c276bddb735386787d0141c83888695c44 by Glen Ditchfield.
Committed on 24/03/2021 at 23:29.
Pushed by gditchfield into branch 'release/21.04'.

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.
Related: bug 169336
FIXED-IN: 5.17.0

M  +9    -3    src/calendarview.cpp

https://invent.kde.org/pim/korganizer/commit/551d46c276bddb735386787d0141c83888695c44