Mat H Posted Friday at 08:43 PM Posted Friday at 08:43 PM (edited) Hello, Some members of our website have been experiencing an issue with the Calendar where requests take 60+ seconds to process and eventually time out. We observed that this issue was occurring under the following conditions: A calendar event was created with TZ America/Chicago, repeats Every Week, and occurs on Saturday & Sunday at 8:00 PM. A member in the Australia/Brisbane (or other larger UTC offsets) visits any part of the Calendar in Monthly view or visits the aforementioned event page. We identified that this was occurring due to a bug in /applications/calendar/sources/Event/Event.php, line 462 in the most recent version, though it has been an issue for a while. When the day index is calculated for the difference in time zones, it does not correctly account for time zone differences that may push an event back from Saturday (local to the Event's TZ) to Sunday (local to the User's TZ), and this error ends up indexing the days array improperly and pushing a NULL into $_repeatDays which causes an infinite loop later on (the loop at line 497). To fix this issue, we've just modified the code to wrap $lookup back to 0 when the day is offset from Saturday to Sunday ([ $lookup % 7 ]); our users report that the issue is resolved and the Calendar appears accurate to their time zone. Edited Friday at 08:48 PM by Mat H
Recommended Posts