Read the statement by Michael Teeuw here.
Calendar events showing on wrong day.
-
@coolie1101 it directs the output of the command (npm start) to a file (somefile.txt)
this is normal file output redirection, same as on windows
the normal MM startup output looks like this
> magicmirror@2.17.1 start /home/sam/MagicMirror > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js [19.11.2021 07:50.19.980] [LOG] Starting MagicMirror: v2.17.1 [19.11.2021 07:50.19.981] [LOG] Loading config ... [19.11.2021 07:50.19.982] [LOG] Loading module helpers ... [19.11.2021 07:50.19.982] [LOG] trying to load module=alert [19.11.2021 07:50.19.982] [LOG] No helper found for module: alert. [19.11.2021 07:50.19.982] [LOG] trying to load module=MMM-Tools [19.11.2021 07:50.19.999] [LOG] Initializing new module helper ... [19.11.2021 07:50.19.999] [LOG] Module helper loaded: MMM-Tools [19.11.2021 07:50.19.999] [LOG] trying to load module=updatenotification [19.11.2021 07:50.20.000] [LOG] Initializing new module helper ... [19.11.2021 07:50.20.000] [LOG] Module helper loaded: updatenotification [19.11.2021 07:50.20.000] [LOG] trying to load module=clock
etc
-
@coolie1101 after copying your new cal entry to ics, and running… it looks good to me…
(with the edited calendarutils.js) (I am central US time)this ics with the other persons info in too
-
@sdetweil Maybe I’m executing it in the wrong order, do i need to “pm2 start mm” and then do “npm start >somefile.txt”? eitherway, there isn’t error log entries for calendar.
0|mm | [19.11.2021 08:55.52.292] [LOG] 0|mm | Create new calendarfetcher for url: http://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics - Interval: 900000 0|mm | [19.11.2021 08:55.52.362] [LOG] 0|mm | Create new calendarfetcher for url: https://calendar.google.com/calendar/ical/p07n98go11onam************%40group.calendar.google.com/public/basic.ics - Interval: 900000 0|mm | [19.11.2021 08:55.52.434] [LOG] 0|mm | Create new calendarfetcher for url: https://calendar.google.com/calendar/ical/olrn3c2sf2k023************%40group.calendar.google.com/private-7d055c9f2a8b6bbfe674************/basic.ics - Interval: 900000 0|mm | [19.11.2021 08:55.52.448] [LOG] 0|mm | Create new calendarfetcher for url: https://calendar.google.com/calendar/ical/mvdgcjroualavv************%40group.calendar.google.com/public/basic.ics - Interval: 900000
Calendar Display
-
@coolie1101 you cant run with pm2 AND with npm start
so, thats why I said
pm2 stop all
THEN (in the MagicMirror folder)
npm start
-
@sdetweil said in Calendar events showing on wrong day.:
(I am central US time)
Don’t sleep much :grinning_face:
-
@coolie1101 said in Calendar events showing on wrong day.:
Don’t sleep much
its past 8am… been up since 6 (cat wakes me reliably)
-
@sdetweil said in Calendar events showing on wrong day.:
@coolie1101 you cant run with pm2 AND with npm start
so, thats why I said
pm2 stop all
THEN (in the MagicMirror folder)
npm start
Got it, I edited the “calendarutils.js” file again and restarted, no error or calendar entries in log, but the display is the same.
-
@coolie1101 weird
edit config.js and change
logLevel: ["INFO", "LOG", "WARN", "ERROR"]
to
thislogLevel: ["INFO", "LOG", "WARN","ERROR","DEBUG"]
and run again, then u will see the calendar processing
-
@coolie1101 and a reminder, there are TWO sections of code u have to comment out
two areas of two lines each
-
@sdetweil Yes.
Line 348 & 358
// if (event.start.tz === moment.tz.guess()) { // if the date hour is less than the offset if (24 - dh < Math.abs(dateoffset / 60)) { // apply the correction to the date/time back to right day date = new Date(date.getTime() + Math.abs(24 * 60) * 60000); // the duration was calculated way back at the top before we could correct the start time.. // fix it for this event entry //duration = 24 * 60 * 60 * 1000; Log.debug("new recurring date2 is " + date); } // }
Line 376 & 386
// if (event.start.tz === moment.tz.guess()) { // if the date hour is less than the offset if (24 - dh < Math.abs(dateoffset / 60)) { // apply the correction to the date/time back to right day date = new Date(date.getTime() + Math.abs(24 * 60) * 60000); // the duration was calculated way back at the top before we could correct the start time.. // fix it for this event entry //duration = 24 * 60 * 60 * 1000; Log.debug("new recurring date2 is " + date); } // }