@botonic/plugin-contentful
Version:
## What Does This Plugin Do?
14 lines • 503 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.offsetWithTimeZone = void 0;
/**
* @return the offset of specified timezone with respect to offset of local timezone
* at specified date
*/
function offsetWithTimeZone(timeZone, date) {
const offset = new Date(date.getTime()).getTimezoneOffset() -
timeZone.utcOffset(date.getTime());
return offset * 60 * 1000;
}
exports.offsetWithTimeZone = offsetWithTimeZone;
//# sourceMappingURL=timezones.js.map