Read the statement by Michael Teeuw here.
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
-
@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); } // }
-
@sdetweil said in Calendar events showing on wrong day.:
and run again, then u will see the calendar processing
Will it work like this “npm start >cal_test_log.txt | grep calendar”?
-
@coolie1101 said in Calendar events showing on wrong day.:
Will it work like this
no…
something like this (couple debug lines added for my testing)
[19.11.2021 07:50.24.603] [DEBUG] Processing entry... [19.11.2021 07:50.24.603] [DEBUG] Event: {"type":"VEVENT","params":[],"start":"2021-04-06T09:00:00.000Z","datetype":"date-time","end":"2021-04-06T14:00:00.000Z","rrule":{"_cache":{"all":false,"before":[],"after":[],"between":[]},"origOptions":{"dtstart":"2021-04-06T09:00:00.000Z","freq":2,"wkst":{"weekday":6},"until":"2021-12-30T04:59:59.000Z","byweekday":[{"weekday":1}]},"options":{"freq":2,"dtstart":"2021-04-06T09:00:00.000Z","interval":1,"wkst":6,"count":null,"until":"2021-12-30T04:59:59.000Z","bysetpos":null,"bymonth":null,"bymonthday":[],"bynmonthday":[],"byyearday":null,"byweekno":null,"byweekday":[1],"bynweekday":null,"byhour":[9],"byminute":[0],"bysecond":[0],"byeaster":null}},"dtstamp":"2021-11-19T12:42:16.000Z","uid":"0v89h5cit8nq6mfribble@google.com","created":"2021-10-26T07:58:43.000Z","description":"","lastmodified":"2021-10-26T08:02:54.000Z","location":"","sequence":"1","status":"CONFIRMED","summary":"YARD WASTE","transparency":"OPAQUE"} [19.11.2021 07:50.24.603] [DEBUG] startDate (local): Tue Apr 06 2021 04:00:00 GMT-0500 (Central Daylight Time) [19.11.2021 07:50.24.603] [DEBUG] endDate (local): Tue Apr 06 2021 09:00:00 GMT-0500 (Central Daylight Time) [19.11.2021 07:50.24.604] [DEBUG] duration: 18000000 [19.11.2021 07:50.24.604] [DEBUG] title: YARD WASTE [19.11.2021 07:50.24.604] [DEBUG] Search for recurring events between: Fri Nov 19 2021 07:50:24 GMT-0600 (Central Standard Time) and Fri Nov 18 2022 23:59:59 GMT-0600 (Central Standard Time) [19.11.2021 07:50.24.605] [DEBUG] Title: YARD WASTE, with dates: ["2021-11-23T09:00:00.000Z","2021-11-30T09:00:00.000Z","2021-12-07T09:00:00.000Z","2021-12-14T09:00:00.000Z","2021-12-21T09:00:00.000Z","2021-12-28T09:00:00.000Z"] [19.11.2021 07:50.24.605] [DEBUG] event.recurrences: undefined [19.11.2021 07:50.24.605] [DEBUG] recurring date is Tue Nov 23 2021 03:00:00 GMT-0600 (Central Standard Time) offset is 360 [19.11.2021 07:50.24.605] [DEBUG] recurring date is Tue Nov 23 2021 03:00:00 GMT-0600 (Central Standard Time) offset is 6 Hour is 03 [19.11.2021 07:50.24.606] [DEBUG] not full day [19.11.2021 07:50.24.606] [DEBUG] offset positive [19.11.2021 07:50.24.606] [DEBUG] Corrected startDate (local): Tue Nov 23 2021 03:00:00 GMT-0600 (Central Standard Time) [19.11.2021 07:50.24.606] [DEBUG] initial tz=America/New_York [19.11.2021 07:50.24.606] [DEBUG] corrected tz=America/New_York [19.11.2021 07:50.24.606] [DEBUG] start date/time=Tue Apr 06 2021 04:00:00 GMT-0500 (Central Daylight Time) [19.11.2021 07:50.24.606] [DEBUG] start offset=-240 [19.11.2021 07:50.24.606] [DEBUG] start date/time w tz =Tue Apr 06 2021 04:00:00 GMT-0500 (Central Daylight Time) [19.11.2021 07:50.24.606] [DEBUG] event date=Tue Nov 23 2021 03:00:00 GMT-0600 (Central Standard Time) [19.11.2021 07:50.24.606] [DEBUG] event offset=-300 hour=4 event date=Tue Nov 23 2021 03:00:00 GMT-0600 (Central Standard Time) [19.11.2021 07:50.24.606] [DEBUG] offset [19.11.2021 07:50.24.606] [DEBUG] adjust up 1 hour dst change [19.11.2021 07:50.24.606] [DEBUG] adjustHours=1 [19.11.2021 07:50.24.606] [DEBUG] duration: 18000000 [19.11.2021 07:50.24.607] [DEBUG] saving event: false
-
@sdetweil It’s running, how long should I wait before checking the output file?, as there is no output in the ssh window.