randomBrainstormer / MMM-GoogleCalendar

Google Calendar for MagicMirror²
MIT License
64 stars 42 forks source link

All Day Events Broadcast with Incorrect Time? #23

Open nickloudermilk opened 1 year ago

nickloudermilk commented 1 year ago

I'm using MMM-CalendarExt3 to display my events from MMM-GoogleCalendar in a month-view. Partial-day events have the correct time, but all day events appear to start at 7 PM (5 hours before their intended start time of midnight). I'm in a time zone that is UTC-5 if that matters. Screenshot

Bovive commented 1 year ago

I have the same problem. Mine show as starting at 6 PM the day before the event. I am UTC-6.

refael6 commented 1 year ago

I use MMM-CalendarExt3 that show module calender. and add to CX3shared.mjs: let offset = new Date().getTimezoneOffset() 60 1000 + 60 60 1000 let startTime = document.createElement('div') let st = new Date(+event.startDate-offset) startTime.classList.add('time', 'startTime', (st.getDate() === tm.getDate()) ? 'inDay' : 'notInDay') startTime.innerHTML = new Intl.DateTimeFormat(locale, eventTimeOptions).formatToParts(st).reduce((prev, cur, curIndex, arr) => { prev = prev + `<span class="eventTimeParts ${cur.type} seq${curIndex}">${cur.value}` return prev }, '') headline.appendChild(startTime)

let endTime = document.createElement('div') let et = new Date(+event.endDate-offset)

refael6 commented 1 year ago

Update: Upon rechecking, I saw that my region zone is not set correctly on the Raspberry. (the time clock whas wrong) After the update it I deleted the offset.