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

Changes to the order of VTIMEZONE components in an .ics file cause sync conflicts against calDAV #1092

Open
Ian2020 opened this issue Oct 9, 2023 · 2 comments

Comments

@Ian2020
Copy link

Ian2020 commented Oct 9, 2023

Hi,

I mentioned this on IRC chat and it was suggested I raise an issue. I've got a local ics file (type=singlefile) that recently starting conflicting against the server (type=caldav) for every item. It looks like my calendar app (Evolution/GNOME) changed the order (but not the content) of all the VTIMEZONE entries in the .ics file.

I've never seen this before in many years of using vdirsyncer and Evolution. My guess is a recent change in how Evolution orders timezones when it writes to file probably triggered the conflicts for vdirsyncer.

vdirsyncer version: 0.18.0

Config:

[general]
status_path = "~/.var/app/vdirsyncer/status/"

[pair my_calendar]
a = "my_calendar_local"
b = "my_calendar_remote"
collections = ["from a", "from b"]

[storage my_calendar_local]
type = "singlefile"
path = "~/Calendar/%s.ics"

[storage my_calendar_remote]
type = "caldav"
url = "XXX"
username = XXX
password.fetch = XXX

The .ics file used to start like this when there were no conflicts (just showing the first timezone entry):

BEGIN:VCALENDAR
VERSION:2.0
PRODID:Data::ICal 0.22
X-EVOLUTION-DATA-REVISION:2023-08-31T13:35:36.222653Z(2)
X-EVOLUTION-DATA-REVISION:2020-04-17T09:40:26.052724Z(2)
...
BEGIN:VTIMEZONE
TZID:America/Denver
BEGIN:STANDARD
DTSTART:20221106T010000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
TZOFFSETFROM:-0600
TZOFFSETTO:-0700
TZNAME:MST
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20220313T030000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
TZOFFSETFROM:-0700
TZOFFSETTO:-0600
TZNAME:MDT
END:DAYLIGHT
END:VTIMEZONE
...

Then it changed to start like this and now every item causes a conflict in vdircyncer:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:Data::ICal 0.22
X-EVOLUTION-DATA-REVISION:2023-09-19T12:16:45.228325Z(7)
X-EVOLUTION-DATA-REVISION:2020-04-17T09:40:26.052724Z(2)
...
BEGIN:VTIMEZONE
TZID:America/New_York
TZURL:http://tzurl.org/zoneinfo-outlook/America/New_York
X-LIC-LOCATION:America/New_York
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
END:STANDARD
END:VTIMEZONE
...

I tried manual conflict resolution with a diffing tool and I could see that if I rearranged the VTIMEZONE components I could get the files to match exactly. So all that has changed in my .ics file is the ordering I believe.

Hopefully if vdirsyncer could just sort the timezones or something these differences could be ignored/auto-resolved. Thanks for any help!

@WhyNotHugo
Copy link
Member

Hopefully if vdirsyncer could just sort the timezones or something these differences could be ignored/auto-resolved. Thanks for any help!

I intend to write a separate tool which can resolve conflicts between semantically equivalent icalendar entries.

That will be usable as a command for conflict resolution.

@marc1uk
Copy link

marc1uk commented Mar 18, 2024

I'm also getting the same thing with orage / gmail syncing, such a tool would be brilliant.

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

3 participants