diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index d18132a6..5c6ce453 100755 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -468,11 +468,6 @@ Module.register("calendar", { for (var e in calendar) { var event = JSON.parse(JSON.stringify(calendar[e])); // clone object - // correct data for the current timezone - var offset = -(new Date().getTimezoneOffset() * 60 * 1000); - event.startDate = event.startDate - offset; - event.endDate = event.endDate - offset; - if (event.endDate < now) { continue; } diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js index 4a6fb0e6..acae13dc 100644 --- a/modules/default/calendar/calendarfetcher.js +++ b/modules/default/calendar/calendarfetcher.js @@ -186,10 +186,7 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumNu // kblankenship1989 - to fix issue #1798, converting all dates to locale time first, then converting back to UTC time const pastLocal = pastMoment.subtract(past.getTimezoneOffset(), "minutes").toDate(); const futureLocal = futureMoment.subtract(future.getTimezoneOffset(), "minutes").toDate(); - const datesLocal = rule.between(pastLocal, futureLocal, true, limitFunction); - const dates = datesLocal.map(function (dateLocal) { - return moment(dateLocal).add(dateLocal.getTimezoneOffset(), "minutes").toDate(); - }); + const dates = rule.between(pastLocal, futureLocal, true, limitFunction); // The "dates" array contains the set of dates within our desired date range range that are valid // for the recurrence rule. *However*, it's possible for us to have a specific recurrence that