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

All Day Events Broadcast with Incorrect Time? #23

Open
nickloudermilk opened this issue Oct 17, 2022 · 3 comments
Open

All Day Events Broadcast with Incorrect Time? #23

nickloudermilk opened this issue Oct 17, 2022 · 3 comments

Comments

@nickloudermilk
Copy link

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
Copy link

Bovive commented Nov 28, 2022

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

@refael6
Copy link

refael6 commented May 28, 2023

I use MMM-CalendarExt3 that show module calender.
and add to CX3_shared.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}</span>
return prev
}, '')
headline.appendChild(startTime)

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

@refael6
Copy link

refael6 commented Jun 1, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants