-
Type:
Improvement
-
Status: QA
-
Priority:
Medium
-
Resolution: Fixed
-
Affects Version/s: 2.4.0
-
Fix Version/s: 2.5.0 beta1, 2.5.0
-
Component/s: None
-
Labels:None
I would like to propose three changes to dealing with time zones in the CalDAV backend.
- Add time zone to DATE-TIME properties
- Prefer TZID from DTSTART over VTIMEZONE
1. Add time zone to DATE-TIME properties
The ical RFC 5545 specifies 4 forms for DATE-TIME properties: https://tools.ietf.org/html/rfc5545#section-3.3.5
- DATE WITH LOCAL TIME (floating)
DTSTART:20180327T100000 - DATE WITH UTC TIME
DTSTART:20180327T080000Z - DATE WITH LOCAL TIME AND TIME ZONE REFERENCE
DTSTART;TZID=Europe/Berlin:20180327T100000 - DATE (floating)
DTSTART;VALUE=DATE:20180327
Right now we are using form 2 (for all-day events we use 4). By not storing the time zone we loose information. When creating an event in a different time zone, other devices do not know this.
I propose to switch to creating vevents with form 3 to keep time zone information.
2. Prefer TZID from DTSTART over VTIMEZONE
While parsing an VEVENT we read the first VTIMEZONE element and use that time zone for the message. This time zone might not be the correct time zone for the message. It could be that the first VTIMEZONE specifies summer time, while the start of the event is during winter time.
I propose to prefer the TZID parameter specified in DTSTART. If no TZID is set in DTSTART, then use the server default time zone.
If we all agree, I will make the changes and pull request.