Repeated events from Google calendar with items deleted a while ago don't appear as deleted in Calendar
Checklist
- [X] I can reproduce the bug with the latest version given here.
- [X] I made sure that there are no existing issues - open or closed - to which I could contribute my information.
- [X] I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
- [X] I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
- [X] I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
- [X] This issue contains only one bug.
- [X] I have read and understood the contribution guidelines.
Affected app version
1.0.3
Affected Android/Custom ROM version
14 (AP2A.240605.024)
Affected device model
Pixel 6
How did you install the app?
F-Droid / IzzyOnDroid
Steps to reproduce the bug
I'm really sorry but this is not consistently reproducible. I tried reproducing it by making a new event and then deleting instances of the repeated event in Google Calendar.
The situation that was implicated in this is: 0. Synced calendar "CalDAV" (that is, the system calendar feature) from Google Calendar
- Old repeated event that's been there for a year
- Delete two instances of the event in Google calendar before installing Fossify Calendar on the phone
- The deleted event instances still appear in Fossify Calendar.
Deleting the excess events from inside Fossify Calendar will cause them to persistently vanish even after deleting the app and reinstalling it, so whatever it does unhaunts the event properly.
I'm going to try to export the calendar from both sides and see if I can diff the broken events. But I'm terribly sorry it's so hard to reproduce.
I've attempted the following reproducer and failed: 0. Set up synced calendar in Fossify.
- Create repeated event on synced calendar from Google Calendar app
- Delete two instances from Google Calendar
- Hopefully (but unsuccessfully) observe that the thing happens.
I've not yet tried doing the thing while the app is deleted.
Expected behavior
I expect the exceptions to repeated events to sync their removal status correctly from Google Calendar synced calendars.
Actual behavior
Certain exceptions to repeated events aren't correctly synchronized to Fossify Calendar.
Screenshots/Screen recordings
Can't sufficiently anonymize it, sorry. Imagine a calendar with weekly events with ones in weeks that you deleted earlier.
Additional information
No response
I have found the cause of this bug. It's that the exclusion dates aren't properly considering the timezone of the calendar and instead are processed in device timezone. So if you have an event in your home timezone and then view it while 9h away such that they cross a date boundary, the exclusions get missed.
Consider the following event:
BEGIN:VEVENT
SUMMARY:the-event
UID:Caldav-13-925
X-FOSSIFY-CATEGORY-COLOR:-6299161
CATEGORIES:[email protected]
LAST-MODIFIED:19700101T000000Z
TRANSP:OPAQUE
DTSTART:20231005T000500Z
DTEND:20231005T010500Z
X-FOSSIFY-MISSING-YEAR:0
DTSTAMP:20240708T141428Z
STATUS:CONFIRMED
RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=WE
BEGIN:VALARM
DESCRIPTION:Herinnering
ACTION:DISPLAY
TRIGGER:-P0DT0H10M0S
END:VALARM
EXDATE:20240704
EXDATE:20240711
EXDATE:20240718
EXDATE:20240725
------- NOTE!! THESE ONES WERE ADDED BY FOSSIFY CALENDAR WHEN I DELETED THOSE EVENT INSTANCES ----------
EXDATE:20240710
EXDATE:20240717
EXDATE:20240724
END:VEVENT
Compare to the Google Calendar export (I cannot confirm that this is what is actually what the app gets from the system calendar service but you note it has timezones all over it):
BEGIN:VEVENT
DTSTART;TZID=America/Vancouver:20231004T170500
DTEND;TZID=America/Vancouver:20231004T180500
RRULE:FREQ=WEEKLY;BYDAY=WE
EXDATE;TZID=America/Vancouver:20240703T170500
EXDATE;TZID=America/Vancouver:20240710T170500
EXDATE;TZID=America/Vancouver:20240717T170500
EXDATE;TZID=America/Vancouver:20240724T170500
DTSTAMP:20240708T142611Z
UID:[email protected]
CREATED:20230731T215015Z
LAST-MODIFIED:20240702T194413Z
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:the-event
TRANSP:OPAQUE
END:VEVENT
Please check if you still have this problem in the latest version.