devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
18 lines (17 loc) • 792 B
JavaScript
/**
* DevExtreme (esm/__internal/scheduler/r1/timezone_calculator/utils.js)
* Version: 24.2.6
* Build date: Mon Mar 17 2025
*
* Copyright (c) 2012 - 2025 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({
getClientOffset: date => timeZoneUtils.getClientTimezoneOffset(date),
tryGetCommonOffset: date => timeZoneUtils.calculateTimezoneByValue(currentTimeZone, date),
tryGetAppointmentOffset: (date, appointmentTimezone) => timeZoneUtils.calculateTimezoneByValue(appointmentTimezone, date)
});