YA-GCal-Notion-Sync-Script icon indicating copy to clipboard operation
YA-GCal-Notion-Sync-Script copied to clipboard

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

Open sykin13 opened this issue 2 years ago • 2 comments

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.

sykin13 avatar Sep 29 '22 02:09 sykin13

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.

hk21702 avatar Sep 29 '22 17:09 hk21702

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

image

mortyccp avatar Sep 30 '22 16:09 mortyccp

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

hk21702 avatar Nov 24 '22 04:11 hk21702