From 3a8587378c9ecbb364ec67466f9234f1391459e9 Mon Sep 17 00:00:00 2001 From: Sam Detweiler Date: Mon, 16 Nov 2020 10:32:29 -0500 Subject: [PATCH] fix full date start time and duration, east of UTC, make getCorrection more understandable with variable name changes --- modules/default/calendar/calendarfetcher.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js index 5701f69c..8b7042d5 100644 --- a/modules/default/calendar/calendarfetcher.js +++ b/modules/default/calendar/calendarfetcher.js @@ -402,7 +402,7 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn // if this is a windows timezone if (event.start.tz.includes(" ")) { // use the lookup table to get theIANA name as moment and date don't know MS timezones - let tz = getIanaTZFrostart_offset(event.start.tz); + let tz = getIanaTZFromMS(event.start.tz); Log.debug("corrected TZ=" + tz); // watch out for unregistered windows timezone names // if we had a successfule lookup @@ -421,7 +421,7 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn const regex = /[+|-]\d*:\d*/; const start_offsetString = event.start.tz.match(regex).toString().split(":"); let start_offset = parseInt(start_offsetString[0]); - start_offset *= event.start.tz[1] == "-" ? -1 : 1; + start_offset *= event.start.tz[1] === "-" ? -1 : 1; adjustHours = start_offset; Log.debug("defined offset=" + start_offset + " hours"); current_offset = start_offset; @@ -483,7 +483,7 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn * lookup iana tz from windows */ let zoneTable = null; - const getIanaTZFrostart_offset = function (msTZName) { + const getIanaTZFromMS = function (msTZName) { if (!zoneTable) { const p = require("path"); zoneTable = require(p.join(__dirname, "windowsZones.json"));