Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dxScheduler - remove fix T1117245 bug(T1185479) #25500

Closed
wants to merge 2 commits into from
Closed
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
10 changes: 1 addition & 9 deletions js/ui/scheduler/recurrence.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ const ruleNames = ['freq', 'interval', 'byday', 'byweekno', 'byyearday', 'bymont
const freqNames = ['DAILY', 'WEEKLY', 'MONTHLY', 'YEARLY', 'SECONDLY', 'MINUTELY', 'HOURLY'];
const days = { SU: 0, MO: 1, TU: 2, WE: 3, TH: 4, FR: 5, SA: 6 };
const loggedWarnings = [];
const MS_IN_HOUR = 1000 * 60 * 60;
const MS_IN_DAY = MS_IN_HOUR * 24;

let recurrence = null;

Expand Down Expand Up @@ -47,8 +45,7 @@ class RecurrenceProcessor {
rruleIntervalParams.minViewDate,
rruleIntervalParams.maxViewDate,
true
)
.filter((date) => date.getTime() + rruleIntervalParams.appointmentDuration >= rruleIntervalParams.minViewTime)
).filter((date) => date.getTime() + rruleIntervalParams.appointmentDuration >= rruleIntervalParams.minViewTime)
.map((date) => this._convertRruleResult(rruleIntervalParams, options, date));
}

Expand Down Expand Up @@ -85,14 +82,9 @@ class RecurrenceProcessor {

_convertRruleResult(rruleIntervalParams, options, rruleDate) {
const localTimezoneOffset = timeZoneUtils.getClientTimezoneOffset(rruleDate);
// NOTE: Workaround for the RRule bug with timezones greater than GMT+12 (e.g. Apia Standard Time GMT+13)
// GitHub issue: https://github.com/jakubroztocil/rrule/issues/555
const additionalWorkaroundOffsetForRrule =
localTimezoneOffset / MS_IN_HOUR <= -13 ? -MS_IN_DAY : 0;
const convertedBackDate = timeZoneUtils.setOffsetsToDate(
rruleDate, [
localTimezoneOffset,
additionalWorkaroundOffsetForRrule,
-options.appointmentTimezoneOffset,
rruleIntervalParams.startIntervalDateDSTShift,
]);
Expand Down
Loading