mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
Set recurrence enddate to end time and use device TZ for vCalendar 1.0
This commit is contained in:
parent
30b509e9ce
commit
0f00bb08a2
@ -347,7 +347,17 @@ class calendar_ical extends calendar_boupdate
|
|||||||
$time = new egw_time($event['recur_enddate'],egw_time::$server_timezone);
|
$time = new egw_time($event['recur_enddate'],egw_time::$server_timezone);
|
||||||
// all calculations in the event's timezone
|
// all calculations in the event's timezone
|
||||||
$time->setTimezone(self::$tz_cache[$event['tzid']]);
|
$time->setTimezone(self::$tz_cache[$event['tzid']]);
|
||||||
$time->setTime(23, 59, 59);
|
if (empty($event['whole_day']) && !empty($event['end']))
|
||||||
|
{
|
||||||
|
$end = new egw_time($event['end'],egw_time::$server_timezone);
|
||||||
|
$end->setTimezone(self::$tz_cache[$event['tzid']]);
|
||||||
|
$arr = egw_time::to($end,'array');
|
||||||
|
$time->setTime($arr['hour'],$arr['minute'],$arr['second']);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$time->setTime(23, 59, 59);
|
||||||
|
}
|
||||||
$event['recur_enddate'] = egw_time::to($time, 'server');
|
$event['recur_enddate'] = egw_time::to($time, 'server');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -613,6 +623,10 @@ class calendar_ical extends calendar_boupdate
|
|||||||
$rrule = $rriter->generate_rrule($version);
|
$rrule = $rriter->generate_rrule($version);
|
||||||
if ($version == '1.0')
|
if ($version == '1.0')
|
||||||
{
|
{
|
||||||
|
if ($event['recur_enddate'])
|
||||||
|
{
|
||||||
|
$rrule['UNTIL'] = self::getDateTime($event['recur_enddate'],$tzid);
|
||||||
|
}
|
||||||
$attributes['RRULE'] = $rrule['FREQ'].' '.$rrule['UNTIL'];
|
$attributes['RRULE'] = $rrule['FREQ'].' '.$rrule['UNTIL'];
|
||||||
}
|
}
|
||||||
else // $version == '2.0'
|
else // $version == '2.0'
|
||||||
|
Loading…
Reference in New Issue
Block a user