MMM-CalendarWeek icon indicating copy to clipboard operation
MMM-CalendarWeek copied to clipboard

Recurring (google calendar) events shown 1 day earlier

Open tcsabina opened this issue 1 year ago • 8 comments

Recurring (google calendar) events shown 1 day earlier.

tcsabina avatar May 02 '23 20:05 tcsabina

Same problem here

jerome-pouiller avatar Nov 05 '23 16:11 jerome-pouiller

It can be solved by updating vendor/ical.js

jerome-pouiller avatar Nov 06 '23 08:11 jerome-pouiller

Change this line:

diff --git i/calendarfetcher.js w/calendarfetcher.js
index 87fbcab..03b5aa9 100644
--- i/calendarfetcher.js
+++ w/calendarfetcher.js
@@ -5,7 +5,7 @@
  * MIT Licensed.
  */

-var ical = require("./vendor/ical.js");
+var ical = require("ical.js");
 var moment = require("moment");

 var CalendarFetcher = function(url, reloadInterval, excludedEvents, maximumEntries, maximumNumberOfDays, auth, includePastEvents) {

Then, remove vendor/ical.js and npm install ical.js

jerome-pouiller avatar Nov 06 '23 08:11 jerome-pouiller

Hi @jerome-pouiller.

This doesn't seem to solve the issue on my MM. I've tried your description here, didn't work. I even used your repo (as the PR is not yet merged), but the issue is still present

Update: In your description here you say to remove vendor/ical.js. But your repo still contains this file. Why?

tcsabina avatar Nov 15 '23 06:11 tcsabina

@tcsabina Indeed, I made a mistake during my tests:

I tried use external ical.js package. However, ical 0.5 still has somme issues and ical 0.8 is incompatible with current MMM-CalendarWeek implementation.

So, I have have updated vendor/ical.js with the version bundled with magic mirror v2.9.0. This is the patch I have applied on my branch and it is sufficient for me.

jerome-pouiller avatar Nov 15 '23 08:11 jerome-pouiller

@jerome-pouiller, So I took a look on this again, as you said that it is working for your.

So actually your PR is not on this repo, but on https://github.com/dberntsson/MMM-CalendarWeek. And I cloned that repo, while the PR was not merged...

So I've used your repo, with your actual change, and it works, kind of.... So the events moved to the correct day (not 1 day earlier), but they are 1 hour too early. Any ideas what is going on? I am in GMT+1, if that matters...

tcsabina avatar Nov 19 '23 19:11 tcsabina

So actually your PR is not on this repo, but on https://github.com/dberntsson/MMM-CalendarWeek. And I cloned that repo, while the PR was not merged...

Now merged!

dberntsson avatar Nov 20 '23 06:11 dberntsson

@tcsabina FYI, I also observe your issue (it tooks me a few days to realize the problem). For now, I haven't had time to go deeper.

jerome-pouiller avatar Nov 26 '23 19:11 jerome-pouiller