hk21702 / YA-GCal-Notion-Sync-Script

Script to synchronize between a Notion database and Google Calendar both ways. Uses Google App Script.
GNU General Public License v3.0
139 stars 10 forks source link

Whole-day event - offset by one day to get the end date #24

Closed sykin13 closed 1 year ago

sykin13 commented 1 year ago

L497 Comment said offset by one day to get the end date. But the code seems to be missing, which leads to the problem of extending the days of whole-day events on GCal after synchronization.

hk21702 commented 1 year ago

This is a known thing relating to time zones being funky in Google apps script. Some people had success in fixing it by going into their project settings and changing to a different "timezone" that has the same GMT offset such that the actual time doesn't really change in reality. I'll add this to the FAQ, but a straightforward fix is unfortunately unlikely.

mortyccp commented 1 year ago

I think this is caused by Google Calendar returning full date event with start and end date not being the same. 🤔

image
hk21702 commented 1 year ago

Fundamentally yes, it is caused by that. The script tries to fix it, but because of weirdness and inconsistencies of how the API and apps script seem to work with different time zones, results are inconsistent. I'm going to close this issue for now, maybe reopen it if I get around to implementing a better fix, but for now, if anyone runs into this issue refer to this wiki entry: https://github.com/hk21702/YA-GCal-Notion-Sync-Script/wiki/FAQ-&-Common-Errors#full-day-gcal-events-show-up-as-two-day-events-in-notion