diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js index 0f8cfb24..3c0c3cd2 100644 --- a/modules/default/calendar/calendarfetcher.js +++ b/modules/default/calendar/calendarfetcher.js @@ -202,13 +202,13 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn // For recurring events, get the set of start dates that fall within the range // of dates we're looking for. // kblankenship1989 - to fix issue #1798, converting all dates to locale time first, then converting back to UTC time - let pastLocal = 0 - let futureLocal = 0 - if(isFullDayEvent(event)){ + let pastLocal = 0; + let futureLocal = 0; + if( isFullDayEvent(event)) { // if full day event, only use the date part of the ranges pastLocal = pastMoment.toDate(); - futureLocal = futureMoment.toDate() - } + futureLocal = futureMoment.toDate(); + } else { pastLocal = pastMoment.subtract(past.getTimezoneOffset(), "minutes").toDate(); futureLocal = futureMoment.subtract(future.getTimezoneOffset(), "minutes").toDate();