feature/IO-2979-DST - Finish DST Stuff

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-10-28 14:04:14 -07:00
parent e605433379
commit 971a81fc27
3 changed files with 28 additions and 21 deletions

View File

@@ -119,19 +119,7 @@ var formats = {
agendaTimeRangeFormat: timeRangeFormat
};
const localizer = (dayjsLib, timezone) => {
// load dayjs plugins
dayjsLib.extend(isBetween);
dayjsLib.extend(isSameOrAfter);
dayjsLib.extend(isSameOrBefore);
dayjsLib.extend(localeData);
dayjsLib.extend(localizedFormat);
dayjsLib.extend(minMax);
dayjsLib.extend(utc);
dayjsLib.locale("en");
dayjsLib.tz.setDefault(timezone);
const localizer = (dayjsLib) => {
var locale = function locale(dj, c) {
return c ? dj.locale(c) : dj;
};
@@ -140,9 +128,9 @@ const localizer = (dayjsLib, timezone) => {
// then use the timezone aware version
//TODO This was the issue entirely...
var dayjs = dayjsLib.tz ? dayjsLib.tz : dayjsLib;
// var dayjs = dayjsLib.tz ? dayjsLib.tz : dayjsLib;
// var dayjs = dayjsLib;
var dayjs = dayjsLib;
function getTimezoneOffset(date) {
// ensures this gets cast to timezone