mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 03:39:55 +00:00
Cross UTC time fix (#3175)
Update calendarfetcherutils.js to force recurrence date time to be the same as event datetime I found an issue with one of my calendars displaying the wrong time for certain recurring events. Each event was set up by someone in a different timezone (Central European) than my own (Eastern US). I traced the issue back to the `Rrule.between()` method generating odd time portions under certain circumstances. The fix I found was to set the UTC time portion of the recurrence datetime to be the same as the UTC time portion of the event start date. This resolved the issues with the maladjusted event times, and had no effect on other event times. While there may be edge cases that are affected, I have been unable to locate any. --------- Co-authored-by: Veeck <github@veeck.de>
This commit is contained in:
parent
a92b3d3f71
commit
79e99e18ea
@ -33,6 +33,7 @@ _This release is scheduled to be released on 2023-10-01._
|
||||
- Fix undefined formatTime method in clock module (#3143)
|
||||
- Fix clientonly startup fails after async added (#3151)
|
||||
- Fix electron width/heigth when using xrandr under bullseye
|
||||
- Fix time issue with certain recurring events in calendar module
|
||||
- Fix ipWhiteList test (#3179)
|
||||
|
||||
## [2.24.0] - 2023-07-01
|
||||
|
@ -313,6 +313,9 @@ const CalendarFetcherUtils = {
|
||||
let curEvent = event;
|
||||
let showRecurrence = true;
|
||||
|
||||
// set the time information in the date to equal the time information in the event
|
||||
date.setUTCHours(curEvent.start.getUTCHours(), curEvent.start.getUTCMinutes(), curEvent.start.getUTCSeconds(), curEvent.start.getUTCMilliseconds());
|
||||
|
||||
// Get the offset of today where we are processing
|
||||
// This will be the correction, we need to apply.
|
||||
let nowOffset = new Date().getTimezoneOffset();
|
||||
|
Loading…
x
Reference in New Issue
Block a user