Read the statement by Michael Teeuw here.
Calendar timezone problems
-
@mlcampbe said in Calendar timezone problems:
I’ve solved this problem by replacing the node-ical script that the default calendar modules uses with a fork of it.
…
Just wanted to say thanks… I had updated my MM recently, and my calendar TZ broke as a result (using multiple different google calendars). Quick google search and I found this post. The fix worked perfectly for me. All my events show the correct TZ corrected time now.
-
@mlcampbe Just found this whilst googling. The solution doesn’t work for me either. It’s a tad frustrating.
I’ve tried with both a google calendar and O365 calendar and both produce the same results (UK time displayed whereas my timezone is Paris).
-
@mlcampbe said in Calendar timezone problems:
I’ve solved this problem by replacing the node-ical script that the default calendar modules uses with a fork of it.
I did some research and found that the default calendar module uses the node-ical modules to parse calendar data. I notice that it is based off of https://github.com/peterbraden/ical.js. I also found https://github.com/jens-maus/node-ical that is based off of the original peterbraden/ical.js. but seems to have been updated to use the npm package moment-timezone.
I did a drop in replacement and it seems to work:
cd modules/default/calendar/vendor
mv ical.js ical.js.orig
git clone https://github.com/jens-maus/node-ical
mv node-ical/ ical.js
cd ical.js
npm installRestarted MM and now my timezones are showing up properly. So I made my own modules out of this so it won’t get overwritten by updates.
I have a problem with the google ical calendar format, its 1 hour off when its used in MMM-CalendarEXT2, but I think it has something to do with winter/summer time.
Can the quote fix this problem?I can see in the folder " ~/MagicMirror/modules/MMM-CalendarExt2/node_modules " that there is a file called ical.js, but how to i update the file to the one in the qoute, so i can test if thats is the problem?
My pi has timezone to Europe / Copenhagen, and the calender entry is ok when i look at my phones calender and also ok on the google calender.
-
@bravooscar is the default calendar ok? I have done a lot of work to get that fixed over the last few releases…
calext2 is no longer maintained…
-
@sdetweil Yes default calendar is ok,so it has to be CalendarEXT2 that has a problem, and it could be the ical.js from above that could help?
-
@bravooscar sorry, no idea.
MM moved away from ical.js when it couldn’t handle some of the requirements from multiple calendar sources. even then I added a lot of code to handle tz and daylight savings shifts