Hello everyone.
One of my freepbx 17 deployment seems to suffer a bug with a local calendar event group based time condition.
In short, it seems to go false when it should go true.
I did some troubleshooting with the help of chatGPT, and it suggested me to modify the file /var/www/html/admin/modules/calendar/IcalParser/IcalRangedParser.php with the following modifications:
On row 370, replace
if ($now > $recurrenceTimestamp && $now < ($recurrenceTimestamp + $eventDuration)) {
array_push($events, $event);
continue 2;
}
with:
if ($recurrenceTimestamp instanceof \DateTime) {
$recurrenceTimestamp = $recurrenceTimestamp->getTimestamp();
}
if ($now > $recurrenceTimestamp && $now < ($recurrenceTimestamp + $eventDuration)) {
$events = $event;
continue 2;
}
Since I had backups, I tried, and the time condition seems to work now.
Of course now I get the warning that the file has been altered.
Is there a better fix, or do I need to check for future calendar module updates that will break the fix?
Thanks in advance.