mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 17:04:14 +01:00
Fix recurrence enddate for vCalendar 1.0, missing pieces
This commit is contained in:
parent
0db219ca7d
commit
50b1e6f4cc
@ -538,13 +538,6 @@ class calendar_rrule implements Iterator
|
||||
$repeat_days = array();
|
||||
$rrule = array();
|
||||
|
||||
if (!isset(self::$tz_cache['UTC']))
|
||||
{
|
||||
self::$tz_cache['UTC'] = calendar_timezones::DateTimeZone('UTC');
|
||||
}
|
||||
|
||||
$utc = self::$tz_cache['UTC'];
|
||||
|
||||
if ($this->type == self::NONE) return false; // no recuring event
|
||||
|
||||
if ($version == '1.0')
|
||||
@ -613,9 +606,15 @@ class calendar_rrule implements Iterator
|
||||
|
||||
if ($this->enddate)
|
||||
{
|
||||
$enddate = clone $this->enddate;
|
||||
$enddate->setTimezone($utc);
|
||||
$rrule['UNTIL'] = $enddate->format('Ymd\THis\Z');
|
||||
$this->rewind();
|
||||
$enddate = $this->current();
|
||||
do
|
||||
{
|
||||
$this->next_no_exception();
|
||||
$occurrence = $this->current();
|
||||
}
|
||||
while ($this->valid() && ($enddate = $occurrence));
|
||||
$rrule['UNTIL'] = $enddate;
|
||||
}
|
||||
|
||||
return $rrule;
|
||||
|
Loading…
Reference in New Issue
Block a user