fix calendar showing previous day when using sliceMultiDayEvents#3555
Merged
khassel merged 2 commits intoMagicMirrorOrg:developfrom Sep 25, 2024
Merged
Conversation
Collaborator
|
do you have the test case that shows the prior failure |
Contributor
Author
I have the ics file. I you set the date to today it will show the previous day too. |
Collaborator
|
ok our test system allows specific day, not today, so set it to same day as testcase? |
Contributor
Author
by today I meant 24th of September :) |
Collaborator
|
i understand, i have to set the testcase date to always sept 24, 2024 |
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"] |
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. |
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.
bfd9d71 to
e83711a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This bug is caused by #3543.
The calculation for midnight adds a day but for endDate we want the day to be subtracted again.