fix #3701, calculation wrong, added testcase, ics, config (#3702)

fixes #3701 

offset calculation wrong when user looking back at east coast event

added testcase
This commit is contained in:
sam detweiler
2025-01-23 01:37:41 -06:00
committed by GitHub
parent 53ac31dcf3
commit af77b7b628
5 changed files with 57 additions and 1 deletions

View File

@@ -662,9 +662,11 @@ const CalendarFetcherUtils = {
Log.debug("signs are the same");
if (Math.sign(eventDiff) === -1) {
//if west, looking at more west
// -350 <-300
if (nowDiff < eventDiff) {
//-600 -420
eventDiff = -(eventDiff - (nowDiff - eventDiff)); //-180
//300 -300 -360 +300
eventDiff = nowDiff - eventDiff; //-180
Log.debug("now looking back east delta diff=", eventDiff);
}
else {