Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions modules/default/calendar/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
5 changes: 1 addition & 4 deletions modules/default/calendar/calendarfetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down