YA-GCal-Notion-Sync-Script
YA-GCal-Notion-Sync-Script copied to clipboard
Whole-day event - offset by one day to get the end date
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.
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.
I think this is caused by Google Calendar returning full date event with start and end date not being the same. 🤔

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