mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 20:22:53 +00:00
fix prettier problems, was run on commit before
This commit is contained in:
parent
b73cfd8a60
commit
82c742f964
@ -415,12 +415,12 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn
|
|||||||
// if there is still an offset, lookup failed, use it
|
// if there is still an offset, lookup failed, use it
|
||||||
if (event.start.tz.startsWith("(")) {
|
if (event.start.tz.startsWith("(")) {
|
||||||
const regex = /[+|-]\d*:\d*/;
|
const regex = /[+|-]\d*:\d*/;
|
||||||
mms=mmo = event.start.tz.match(regex).toString();
|
mmo = event.start.tz.match(regex).toString();
|
||||||
|
mms = mmo;
|
||||||
if (debug) Log.log("ical offset=" + mmo);
|
if (debug) Log.log("ical offset=" + mmo);
|
||||||
mm = moment.tz(moment(date));
|
mm = moment.tz(moment(date));
|
||||||
mm.utcOffset(mmo)
|
mm = mm.utcOffset(mmo);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// get the start time in that timezone
|
// get the start time in that timezone
|
||||||
if (debug) Log.log("ttttttt=" + moment(event.start).toDate());
|
if (debug) Log.log("ttttttt=" + moment(event.start).toDate());
|
||||||
mms = moment.tz(moment(event.start), event.start.tz).utcOffset();
|
mms = moment.tz(moment(event.start), event.start.tz).utcOffset();
|
||||||
@ -440,7 +440,7 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn
|
|||||||
if (debug) Log.log("offset");
|
if (debug) Log.log("offset");
|
||||||
let h = parseInt(mm.format("H"));
|
let h = parseInt(mm.format("H"));
|
||||||
// check if the event time is less than the offset
|
// check if the event time is less than the offset
|
||||||
if (h > 0 && h < (Math.abs(mmo) / 60)) {
|
if (h > 0 && h < Math.abs(mmo) / 60) {
|
||||||
// if so, rrule created a wrong date (utc day, oops, with utc yesterday adjusted time)
|
// if so, rrule created a wrong date (utc day, oops, with utc yesterday adjusted time)
|
||||||
// we need to fix that
|
// we need to fix that
|
||||||
adjustHours = 24;
|
adjustHours = 24;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user