Calendar: fix bug in creating DTEND from DTSTART
This commit is contained in:
parent
642ccd27ab
commit
fe3bcb5fe2
|
@ -44,8 +44,8 @@ foreach($events as $event){
|
|||
$return_event = create_return_event($event, $vevent);
|
||||
|
||||
$dtstart = $vevent->DTSTART;
|
||||
$dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent);
|
||||
$start_dt = $dtstart->getDateTime();
|
||||
$dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent);
|
||||
$end_dt = $dtend->getDateTime();
|
||||
if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE){
|
||||
$return_event['allDay'] = true;
|
||||
|
|
|
@ -309,6 +309,8 @@ class OC_Calendar_Object{
|
|||
$dtend = $vevent->DTEND;
|
||||
}else{
|
||||
$dtend = clone $vevent->DTSTART;
|
||||
// clone creates a shallow copy, also clone DateTime
|
||||
$dtend->setDateTime(clone $dtend->getDateTime(), $dtend->getDateType());
|
||||
if ($vevent->DURATION){
|
||||
$duration = strval($vevent->DURATION);
|
||||
$invert = 0;
|
||||
|
@ -817,4 +819,4 @@ class OC_Calendar_Object{
|
|||
|
||||
return $vcalendar;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue