Skip to content
This repository has been archived by the owner on Oct 31, 2018. It is now read-only.

Commit

Permalink
Merge pull request #994 from gvde/fix-dtend-value
Browse files Browse the repository at this point in the history
only set DTEND VALUE if DTSTART has VALUE set.
  • Loading branch information
georgehrke committed Dec 11, 2015
2 parents 426563a + 9b5191e commit b511a49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ public function import() {
if(!is_null($object->DTSTART)){
$dtend = OC_Calendar_Object::getDTEndFromVEvent($object);
if($object->DTEND) {
$object->DTEND['VALUE'] = $object->DTSTART['VALUE'];
if ( !empty($object->DTSTART['VALUE']) ) {
$object->DTEND['VALUE'] = $object->DTSTART['VALUE'];
}
$dtend = $dtend->getDateTime();
$dtend->setTimeZone($object->DTSTART->getDateTime()->getTimeZone());
$object->DTEND->setDateTime($dtend);
Expand Down

0 comments on commit b511a49

Please sign in to comment.