FossifyOrg / Calendar

A simple calendar with events, customizable widgets and no ads.
https://www.fossify.org
GNU General Public License v3.0
717 stars 56 forks source link

Google Calendar All-day "Every week" events have a different start day when CalDAV synced #143

Open LucaMkIII opened 8 months ago

LucaMkIII commented 8 months ago

Checklist

Affected app version

1.0.2

Affected Android/Custom ROM version

Android 12

Affected device model

Moto G Power (2022)

How did you install the app?

Google Play Store

Steps to reproduce the bug

  1. Create an event in Google Calendar that is
    • All-day
    • Recurring weekly by selecting "Every week" (has to be the quick option, not a custom "Repeats every 1 weeks on Tuesday")
    • Duration does not matter (I've tested 1 day - 8 days)
  2. Using CalDAV sync, view the event in Fossify Calendar
    • It's easiest to see in Monthly view, but it shows in all views

Expected behavior

Event start date is identical between the two apps.

Actual behavior

Event start date in Fossify Calendar is 6 days after the event start date in Google Calendar. (So if it starts on a Tuesday in Google Calendar, it will start the next Monday in Fossify Calendar.)

Screenshots/Screen recordings

Google Calendar Monthly View (both good and bad examples shown)

Fossify Calendar Monthly View (both good and bad examples shown):

FossifyCalendar_MonthlyView

How to trigger in Google Calendar:

HowToTrigger

An affected event, shown in Google Calendar:

BadEvent_GoogleView

An affected event, shown in Fossify Calendar:

BadEvent_FossifyView

Additional information

I expect the issue exists in the CalDAV data. I don't know whether it is Google Calendar writing it wrong, or Fossify Calendar reading it wrong.

Weekly-recurring events created in Fossify Calendar are fine. They show the same as Google Calendar events created by using the "Custom" recurrence option.

Here is further testing I did, but I'm guessing it's all related to the same bug:

Aga-C commented 8 months ago

I tested this on Google Calendar on my Google account and on my local account, and events were showing fine in Fossify Calendar. Do you use your main Google account to store the event, work account or some another account?

Also, could you export the event that's shown correctly in Google Calendar but wrong in Fossify to ICS and upload it here? Please export it in Google Calendar (open event → three-dots menu → Forward) because we'd like to check the original entry.

LucaMkIII commented 8 months ago

It's a standard Google account. I do share my calendar with another account I own. However, I was able to replicate the issue with a non-shared calendar.

Something else I thought of (in case it matters): all of the events that I created in Google Calendar were created in the Google Calendar app, not online.

I've attached 4 .ics files (extensions changed to satisfy GitHub). "Deletable" is the calendar I took screenshots of. "luca" is the not-shared calendar (and has fewer events in it). I've attached the exported calendars from both Google Calendar and Fossify Calendar. I couldn't get Google to export anything less than a complete calendar, so that's what I did for everything.

Deletable_FromFossify.ics.txt Deletable_FromGoogle.ics.txt luca_FromFossify.ics.txt luca_FromGoogle.ics.txt

LucaMkIII commented 8 months ago

I trimmed up the calendars in a text editor to include just the original problem event. Here they are:

Event_FromFossify.ics.txt Event_FromGoogle.ics.txt

Aga-C commented 8 months ago

Thanks for sending files! I can clearly see that repeating rule is strangely modified in Fossify version comparing to Google version. Google's WEEKLY;WKST=MO became WEEKLY;INTERVAL=1;BYDAY=MO. I don't know why it happened and why I couldn't reproduce it - maybe it's connected to the timezone (GMT+1 here) or Sunday as a week-start (in my country we start week with Monday). I think that this information will help find the problem.

nate2014jatc commented 8 months ago

I seem to be experiencing a similar issue with some events I have that are set to repeat on certain days every two weeks. Google's Calendar, and my Nextcloud Calendar seem to be interpretting the events correctly, but they are badly skewed in Fossify Calendar.

(trying to figure out ics exports, will update when I have)

Fossify:

Screenshot_20240215-213115 Screenshot_20240215-213118

events.ics.txt events2.ics.txt

Google:

Screenshot_20240215-213228 Screenshot_20240215-213231

2658fad6-0226-4bed-9387-bc6d81b036cf.ics.txt 065bbd7f-61c3-46fc-906e-077db1c991c9.ics.txt

thomaseizinger commented 7 months ago

I think I am running into the same bug. For me, the event is an invite received from Google Calendar. Here is the event exported from "Etar" where it shows up correctly in the calendar:

etar-export-correct.ics.txt

Here is the event as exported by Fossify's Calendar:

fossify-export-wrong.ics.txt

I trimmed some of the personal information like description and attendees from the event. What might also be interesting there is that fossify's event didn't even have attendee information.

Because it is a recurring event, the event shows up on the wrong day for me. It is meant to be every Wednesday (AEST) but it shows up on Tuesday.