Macintosh iCal, (and probably other publishers), creates an UNTIL time by specifying 11:59pm on the last day of a repeating event. However, it does this using GMT time and is timezone sensitive, so in the U.S., the date part of the UTC time will actually be on the following day. For example, iCal generated the following end date and time for an event ending on 7/1/2011 US/Pacific time:
20110702T065959Z
PhpICalendar incorrectly reads this as ending on 7/2/2011, when the server showing the Web page is on a later time zone than the computer that generated the iCal file.
The problem appears to be in recur_functions.php here:
// Why are we arbitrarily setting the time to noon? $date = date\('Ymd', $time\); $time = strtotime\($date . ' 12:00:00'\); $until\_date = date\('Ymd', $until\_unixtime\); $until\_unixtime = strtotime\($until\_date . ' 12:00:00'\);
Note the comment questioning why the time is being changed to noon. It is not clear whatis the rationale for this, but the net effect is that $date gets set to the day after the ending date, due to the timezone difference between the server and the ics file creator, and then the time gets changed to noon, server time. The event in question's time also is temporarily changed to noon, effectively negating the ability for the time portion of UNTIL to control the boundary of the event. Would hate to change this without consulting with the person who wrote the above code, but this is a problem.
Full event content is here. This is created pacific time, but displayed in central time.
BEGIN:VEVENT
SEQUENCE:9
TRANSP:OPAQUE
UID:362BCD0D-0A40-439E-9762-E660F3DEA186
DTSTART;TZID=US/Pacific:20110627T140000
DTSTAMP:20110426T221215Z
SUMMARY:Soccer Camp
CREATED:20110406T064833Z
DTEND;TZID=US/Pacific:20110627T170000
RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20110702T065959Z
END:VEVENT
Actually, it is displayed on a server that is central time, but the config file is set to pacific time. The events are correctly displayed, its just that they extend for one day too much.