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

Calendar Repeating Events one day off #2885

Closed
DAHines57 opened this issue Jul 23, 2022 · 12 comments
Closed

Calendar Repeating Events one day off #2885

DAHines57 opened this issue Jul 23, 2022 · 12 comments

Comments

@DAHines57
Copy link

Hardware: RPi 3, Stretch
Node version: v16.14.2
MagicMirror: v2.20.0

Description:
I have repeating google calendar event set for Thursdays at 8pm to 11pm, and this displays correctly there, but in the calendar module this event is shown to be on Friday from 8 to 11pm. I have also noticed if I set the event to be 6pm to 8pm, the event displays correctly in the module.

Timezone: America/Chicago

iCal:

BEGIN:VEVENT
DTSTART;TZID=America/Chicago:20220728T200000
DTEND;TZID=America/Chicago:20220728T230000
RRULE:FREQ=DAILY;COUNT=30;INTERVAL=7
DTSTAMP:20220723T162624Z

Calendar Config:

			module: "calendar",
			header: "Calendar",
			position: "bottom_left",
			disabled: false,
			config: {
				showEnd: false,
				dateFormat: "MMM DD - hh:mm A",
				maximumEntries: 6,
				calendars: [

Screenshot:
image

Thanks!

@sdetweil
Copy link
Collaborator

@DAHines57 what did u do to fix this?

@DAHines57
Copy link
Author

DAHines57 commented Jul 25, 2022

@sdetweil I had noticed that my repository was acting strange, so I re-cloned the repo and tried again. However I did notice that when I create the recurring event from my iPhone the date is still off. But if I create the event directly in google calendar the dates show correctly.
(edit) The other odd thing was if I create a weekly recurring event on 7/28 from 8-9pm, the module would not show that first event on 7/28. It would only show that event from 8/4 and onward. I resolved this by creating the event one week earlier than I planned.

@sdetweil
Copy link
Collaborator

ok, thanks. I will look at this. is the ve ent above a good example?

@DAHines57
Copy link
Author

Here's a more updated example, the first was created directly in gCal ('Test Gcal'), the second using the iphone default calendar app ('Test') .

BEGIN:VEVENT
DTSTART;TZID=America/Chicago:20220721T200000
DTEND;TZID=America/Chicago:20220721T230000
RRULE:FREQ=WEEKLY;BYDAY=TH
DTSTAMP:20220725T015743Z
UID:
CREATED:20220725T005851Z

BEGIN:VEVENT
DTSTART;TZID=America/Chicago:20220728T210000
DTEND;TZID=America/Chicago:20220728T220000
RRULE:FREQ=WEEKLY;BYDAY=TH
DTSTAMP:20220725T015743Z
UID:
CREATED:20220725T014034Z

image

@DAHines57
Copy link
Author

@sdetweil should I reopen this?

@sdetweil
Copy link
Collaborator

this is a bug in the repeating rule processor we use
( my clock is set to Chicago as well)

we asked for the right range,
now Mon Jul 25 2022 08:04:54 GMT-0500
to (year from now)
Mon Jul 24 2023 23:59:59 GMT-0500

and it skipped 7/28, returning 08/04 as the 1st date
["2022-08-04T02:00:00.000Z",

Search for recurring events between: Mon Jul 25 2022 08:04:54 GMT-0500 (Central Daylight Time) and Mon Jul 24 2023 23:59:59 GMT-0500 (Central Daylight Time)
[25.07.2022 08:04.54.634] [DEBUG] Title: start 28, with dates: ["2022-08-04T02:00:00.000Z","2022-08-11T02:00:00.000Z","2022-08-18T02:00:00.000Z"

@DAHines57
Copy link
Author

Interesting, makes sense why just starting the event a week earlier "solves" the problem

@sdetweil
Copy link
Collaborator

sdetweil commented Sep 5, 2022

can u reopen this.. I have a decent fix

@DAHines57 DAHines57 reopened this Sep 5, 2022
@sdetweil sdetweil mentioned this issue Sep 5, 2022
@khassel
Copy link
Collaborator

khassel commented Oct 2, 2022

seems to be fixed in v2.21.0, can this be closed @sdetweil ?

@sdetweil
Copy link
Collaborator

sdetweil commented Oct 2, 2022

just waiting for confirmation

@DAHines57
Copy link
Author

@sdetweil It's working for me after pulling v2.21.0

@sdetweil
Copy link
Collaborator

sdetweil commented Oct 3, 2022

awesome. can u close this issue now.

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