-
Notifications
You must be signed in to change notification settings - Fork 269
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
Google calendar: moves AllDay Events around #323
Comments
Can you provide more details? Eg.
|
I have to correct myself. It is no longer only Samsung Devices. The bug exists across devices. I use an iPhone and do not have any problems with sync issues. Most of my users neither have problems even on android devices. From this moment on, syncs from android to google calendar via this plugin move ONLY allday events. |
Sounds like the problem is about retrieval of events from calendar. Though I wonder if this is caused by some strange approach handled by Google or bug from the package itself. We may need to write around the bug if it's the former. |
Is anybody able to reproduce the problem? |
Your issue may be related to the way allDay events are stored. They should be stored from midnight utc on the first day to midnight utc on the day following the last day. For example, a 2-day allDay event on Jan 1-2 should be stored from Jan 1 00:00:00Z to Jan 3 00:00:00Z. Single-day events are currently being stored as Jan 1 00:00:00 to Jan 1 00:00:00, when the end date should be Jan 2 00:00:00. Also, I believe it is using the local timezone, not UTC. See this note about writing allDay events. Check out my PR #324 and see if that fixes your issue. Also, see my other comment, about problems with the way Android (or Android's CalendarContract) handles local calendars vs synced calendars. In my project, I ended up removing the ability to use local calendars for this reason. edit: changed "Jan 2" to "Jan 3" (it should be midnight on the day after the event). Also, added more info about how single-day events are currently being stored. |
Yes, some things are not right with allDay events that span over more than one day. If you store an event that spans over 2 days, setting the allDay flag to true and the start time and end time like this (using the .toIso8601String() and print): |
I have gotten a few bug reports, that allDay Events are starting to appear on wrong days (often 1 day earlier than correct).
I did not change anything on my code, neither did this plugin change.
It looks like my app / the plugin is inserting the events correctly, as for 10 second around the elements appear correctly for example in google calendar. After this 10seconds they start to move a day earlier...
Anyone got any similar bug reports or has any idea on how to solve this? I am not finding any issues. iOS is fine, only android in Samsung devices (and i do not own any)
The text was updated successfully, but these errors were encountered: