Read the statement by Michael Teeuw here.
Different times in MM and google calendar - MMM-CalendarExt2
-
Using MMM-CalendarExt2 module, I can see the events from my google calendar on my Magic Mirror, but times are different.
On my google calendar, it’s GMT+2 hours.
On Magic Mirror, it’s GMT.
What can be the reason for this difference ?
How could I solve this problem ?Thank you for your help.
alphanet
-
@alphanet what timezone is your pi set to?
and what timezone are the events?
if u download the ics file and edit it w a text editor, then u can see the event timezones ( or not, in which case they default to the system timezone)
-
@alphanet
The symptom could happen from various reasons.Where the URL of the calendar comes from? Directly from Google calendar? or another source? If the calendar would be imported from another source and the original event might lay in a different timezone, it could happen.
Or simply, your events have a wrong(or unparsable) timezone format.
Anyway, you can adjust the timezone of events by force with
forceLocalTZ:true
oncalendar
section (https://github.com/MMM-CalendarExt2/MMM-CalendarExt2/blob/main/docs/Configuration/Calendar.md). It will override timezone information to your local timezone by force. -
Thank you very much sdetweil for your help.
In the terminal , the timezone is set to UTC.
In the graphical environment, it is GMT + 02.00.
I downloaded the .ics file and saw the line :
X-WR-TIMEZONE: “Europe/Paris” , this is ok.
But a particular event for example :- on Google Calendar, the registered time displayed is
16:00 - 17:00 (GMT + 02:00) - but the corresponding lines in the .ics are :
DTSTART:20220722T140000Z
DTEND:20220722T150000Z
It seems the difference already appears there ?
or this lines are in GMT time ?
I thought I had to modify the timezone in the terminal.
I did it with the command timedatectl set-timezone “Europe/Paris”.
I obtained the good timezone in the terminal with CEST time instead of universal time.But I still have bad times (GMT instead of GMT+2) in the events displayed on Magic Mirror.
I must be missing something perhaps in Google Calendar settings since the difference appears in the .ics file ?
Cordial greetings.
- on Google Calendar, the registered time displayed is
-
Thank you very much MMRIZE for your help.
The URL of the calendar comes directly from Google Calendar.
I have added the line forceLocalTZ:true on calendar section, but this doesn’t solve the problem.
Perhaps my local timezone is not well defined ?
Cordial greetings.
alphanet
-
@alphanet on the pi desktop, click the date upper right, and set the timezone for the system
-
Thank you sdetweil for your message.
I have tried several timezones for the system upper right on the pi desktop.
It has no effect on the times displayed on my calendar on Magic Mirror, still GMT+0 instead of GMT+2 on my Google Calendar.
I have also tried different timezones in Google Calendar.
It has no effect either on my calendar on Magic Mirror.
It seems that Google Calendar uses UTC time in .ics files.Now the timezone is set correctly on my system.
The problem should be in my configuration of the module MMM-CalendarExt2.I have just put the line forceLocalTZ to false, and at last, both calendars on Google Calendar and on MMM_CalendarExt2 are synchronized !
It’s a bit strange as I thought forceLocalTZ:true should force the time to my local timezone and the contrary happens ?!
But the problem is solved.
Thanks a lot for your help.
Cordial greetings.