devextreme
Version:
JavaScript/TypeScript Component Suite for Responsive Web Development
19 lines (18 loc) • 824 B
JavaScript
/**
* DevExtreme (esm/__internal/scheduler/r1/timezone_calculator/utils.js)
* Version: 25.2.8
* Build date: Mon Jun 08 2026
*
* Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import timeZoneUtils from "../../m_utils_time_zone";
import {
TimeZoneCalculator
} from "./calculator";
export const createTimeZoneCalculator = currentTimeZone => new TimeZoneCalculator({
timeZone: currentTimeZone,
getClientOffset: date => timeZoneUtils.getClientTimezoneOffset(date),
tryGetCommonOffset: date => timeZoneUtils.calculateTimezoneByValue(currentTimeZone, date),
tryGetAppointmentOffset: (date, appointmentTimezone) => timeZoneUtils.calculateTimezoneByValue(appointmentTimezone, date)
});