Fix calendar rrule until where event is fullday but rrule until has a non-0 time (#3782)

This fixes #3781 

tests supplied

see
https://forum.magicmirror.builders/topic/19637/issue-with-outlook-recurring-events
This commit is contained in:
sam detweiler
2025-05-12 16:39:36 -05:00
committed by GitHub
parent ed419ce5b3
commit 2422e847b1
5 changed files with 70 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
let config = {
address: "0.0.0.0",
ipWhitelist: [],
timeFormat: 12,
modules: [
{
module: "calendar",
position: "bottom_bar",
config: {
hideDuplicates: false,
maximumEntries: 100,
calendars: [
{
maximumEntries: 100,
url: "http://localhost:8080/tests/mocks/fullday_until.ics"
}
]
}
}
]
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {
module.exports = config;
}

View File

@@ -84,6 +84,10 @@ describe("Calendar module", () => {
await helpers.startApplication("tests/configs/modules/calendar/rrule_until.js", "07 Mar 2024 10:38:00 GMT-07:00", [], "America/Los_Angeles");
await expect(doTestCount()).resolves.toBe(1);
});
it("Issue #3781 recurrence rrule until with date only uses timezone offset incorrectly", async () => {
await helpers.startApplication("tests/configs/modules/calendar/fullday_until.js", "01 May 2025", [], "America/Los_Angeles");
await expect(doTestCount()).resolves.toBe(1);
});
});
/*

View File

@@ -0,0 +1,28 @@
BEGIN:VCALENDAR
BEGIN:VEVENT
DESCRIPTION:\n
RRULE:FREQ=YEARLY;UNTIL=20250504T230000Z;INTERVAL=1;BYMONTHDAY=5;BYMONTH=5
UID:040000008200E00074C5B7101A82E00800000000DAEF6ED30D9FDA01000000000000000
010000000D37F812F0777844A93E97B96AD2D278B
SUMMARY:Person A's Birthday
DTSTART;VALUE=DATE:20250505
DTEND;VALUE=DATE:20250506
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20250428T133000Z
TRANSP:TRANSPARENT
STATUS:CONFIRMED
SEQUENCE:0
LOCATION:
X-MICROSOFT-CDO-APPT-SEQUENCE:0
X-MICROSOFT-CDO-BUSYSTATUS:FREE
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-INSTTYPE:1
X-MICROSOFT-DONOTFORWARDMEETING:FALSE
X-MICROSOFT-DISALLOW-COUNTER:FALSE
X-MICROSOFT-REQUESTEDATTENDANCEMODE:DEFAULT
X-MICROSOFT-ISRESPONSEREQUESTED:FALSE
END:VEVENT
END:VCALENDAR