Skip to content
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

Missing first event #113

Closed
rjpianist opened this issue Mar 26, 2020 · 2 comments
Closed

Missing first event #113

rjpianist opened this issue Mar 26, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@rjpianist
Copy link

Hi! I love this script! It makes my subscription SO much more useful, since the info is up to date. But, I'd like to just sync events in the future, and if I do that, often the first event or two will be missing. My theory is that it has to do with the ics calendar and my google calendar being in different time zones. Is that possible? Could I change something in the script so it will actually go back a few hours or even sync future events and maybe one or two days of past events?

@jonas0b1011001
Copy link
Collaborator

Hi, filtering past events takes place in two stages to improve execution time.

  1. Helpers.gs Line 138
eventEnde = eventEnde.adjust(1,0,0,0);//Avoid timezone issues

At this early stage timezones are not considered yet which is why we include events from the day before. You can change it to (2,0,0,0) and see it it makes a difference.

  1. Helpers.gs Line 466
if (icalEvent.endDate.compare(startUpdateTime) < 0){

Timezones should now be fully handled, therefore no Offset. Change it to

var endDate = icalEvent.endDate.clone();
endDate = endDate.adjust(2,0,0,0);
if (endDate.compare(startUpdateTime) < 0){

and see if it changes the sync result.

With these changes it should include the past two days, please let me know if it has any effect on your end.

@rjpianist
Copy link
Author

Thanks for your help! It seems to work great, but now it is including one month of past events. I don't know what the problem yesterday was with it not showing my first upcoming event.

@derekantrican derekantrican added the bug Something isn't working label Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants