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

fix calendar showing previous day when using sliceMultiDayEvents #3555

Merged

Conversation

MarcLandis
Copy link
Contributor

This bug is caused by #3543.

The calculation for midnight adds a day but for endDate we want the day to be subtracted again.

@sdetweil
Copy link
Collaborator

do you have the test case that shows the prior failure

@MarcLandis
Copy link
Contributor Author

do you have the test case that shows the prior failure

I have the ics file. I you set the date to today it will show the previous day too.

slicemultiday.ics.txt

@sdetweil
Copy link
Collaborator

ok our test system allows specific day, not today, so set it to same day as testcase?

@MarcLandis
Copy link
Contributor Author

ok our test system allows specific day, not today, so set it to same day as testcase?

by today I meant 24th of September :)

@sdetweil
Copy link
Collaborator

sdetweil commented Sep 24, 2024

i understand, i have to set the testcase date to always sept 24, 2024

@sdetweil
Copy link
Collaborator

so the REAL problem is that there should be no event to process, but the RRULE handler retrurned one

24-09-24 15:41:07.987] [DEBUG] start: Mon Sep 23 2024 00:00:00 GMT+0100 (British Summer Time) 
[2024-09-24 15:41:07.987] [DEBUG] end:: Tue Sep 24 2024 00:00:00 GMT+0100 (British Summer Time) 
[2024-09-24 15:41:07.987] [DEBUG] duration: 86400000 
[2024-09-24 15:41:07.987] [DEBUG] title: 1 day repeat 
[2024-09-24 15:41:07.987] [DEBUG] fullday 
[2024-09-24 15:41:07.987] [DEBUG] pastLocal: Tue Sep 24 2024 00:00:01 GMT+0100 (British Summer Time) 
[2024-09-24 15:41:07.987] [DEBUG] futureLocal: Tue Sep 23 2025 23:59:59 GMT+0100 (British Summer Time) 
[2024-09-24 15:41:07.987] [DEBUG] Search for recurring events between: Tue Sep 24 2024 00:00:01 GMT+0100 (British Summer Time) and Tue Sep 23 2025 23:59:59 GMT+0100 (British Summer Time) 
[2024-09-24 15:41:07.987] [DEBUG] RRule: DTSTART:20240923T000000Z
RRULE:FREQ=YEARLY 
[2024-09-24 15:41:07.987] [DEBUG] Title: 1 day repeat, with dates: ["2024-09-23T00:00:00.000Z","2025-09-23T00:00:00.000Z"] 

@MarcLandis
Copy link
Contributor Author

For the "1 day repeat" event it shouldn't return it, but for the "2 days repeat" it should and the day in the past was shown too.

@sdetweil
Copy link
Collaborator

your fix is good.. can u update the changelog

This bug is caused by MagicMirrorOrg#3543.

The calculation for midnight adds a day but for endDate we want the day to be subtracted again.
@MarcLandis MarcLandis force-pushed the fix_calendar_slicemultidayevents branch from bfd9d71 to e83711a Compare September 25, 2024 06:11
@khassel khassel merged commit 2e6e868 into MagicMirrorOrg:develop Sep 25, 2024
8 checks passed
@MarcLandis MarcLandis deleted the fix_calendar_slicemultidayevents branch September 25, 2024 19:18
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

Successfully merging this pull request may close these issues.

3 participants