mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 04:02:12 +00:00
fix date correction comparison for fulldate, just less than, not less or equal
This commit is contained in:
parent
512c392386
commit
fc14431147
@ -332,15 +332,15 @@ const CalendarUtils = {
|
|||||||
Log.debug("Fullday");
|
Log.debug("Fullday");
|
||||||
// If the offset is negative (east of GMT), where the problem is
|
// If the offset is negative (east of GMT), where the problem is
|
||||||
if (dateoffset < 0) {
|
if (dateoffset < 0) {
|
||||||
//if (dh <= Math.abs(dateoffset / 60)) {
|
if (dh < Math.abs(dateoffset / 60)) {
|
||||||
// reduce the time by the offset
|
// reduce the time by the offset
|
||||||
// Apply the correction to the date/time to get it UTC relative
|
// Apply the correction to the date/time to get it UTC relative
|
||||||
date = new Date(date.getTime() - Math.abs(24 * 60) * 60000);
|
date = new Date(date.getTime() - Math.abs(24 * 60) * 60000);
|
||||||
// the duration was calculated way back at the top before we could correct the start time..
|
// the duration was calculated way back at the top before we could correct the start time..
|
||||||
// fix it for this event entry
|
// fix it for this event entry
|
||||||
//duration = 24 * 60 * 60 * 1000;
|
//duration = 24 * 60 * 60 * 1000;
|
||||||
Log.debug("new recurring date1 is " + date);
|
Log.debug("new recurring date1 fulldate is " + date);
|
||||||
//}
|
}
|
||||||
} else {
|
} else {
|
||||||
// if the timezones are the same, correct date if needed
|
// if the timezones are the same, correct date if needed
|
||||||
//if (event.start.tz === moment.tz.guess()) {
|
//if (event.start.tz === moment.tz.guess()) {
|
||||||
@ -351,7 +351,7 @@ const CalendarUtils = {
|
|||||||
// the duration was calculated way back at the top before we could correct the start time..
|
// the duration was calculated way back at the top before we could correct the start time..
|
||||||
// fix it for this event entry
|
// fix it for this event entry
|
||||||
//duration = 24 * 60 * 60 * 1000;
|
//duration = 24 * 60 * 60 * 1000;
|
||||||
Log.debug("new recurring date2 is " + date);
|
Log.debug("new recurring date2 fulldate is " + date);
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user