Reapply fix by Florian Pritz: change DATETIME to DATE-TIME in vcards

The rfc [1] only mentions "DATE-TIME" and after this change events
created in the web ui can be imported by lightning. Before it threw a
syntax error.

[1]: https://tools.ietf.org/html/rfc5545

Signed-off-by: Florian Pritz <bluewind@xinu.at>

From commit 71706282f7
This commit is contained in:
Florian Pritz 2011-09-22 23:17:23 +02:00 committed by Bart Visscher
parent 84e209f1e0
commit 98fad5de92
2 changed files with 6 additions and 6 deletions

View File

@ -70,20 +70,20 @@ class Sabre_VObject_Element_DateTime extends Sabre_VObject_Property {
$this->setValue($dt->format('Ymd\\THis'));
$this->offsetUnset('VALUE');
$this->offsetUnset('TZID');
$this->offsetSet('VALUE','DATETIME');
$this->offsetSet('VALUE','DATE-TIME');
break;
case self::UTC :
$dt->setTimeZone(new DateTimeZone('UTC'));
$this->setValue($dt->format('Ymd\\THis\\Z'));
$this->offsetUnset('VALUE');
$this->offsetUnset('TZID');
$this->offsetSet('VALUE','DATETIME');
$this->offsetSet('VALUE','DATE-TIME');
break;
case self::LOCALTZ :
$this->setValue($dt->format('Ymd\\THis'));
$this->offsetUnset('VALUE');
$this->offsetUnset('TZID');
$this->offsetSet('VALUE','DATETIME');
$this->offsetSet('VALUE','DATE-TIME');
$this->offsetSet('TZID', $dt->getTimeZone()->getName());
break;
case self::DATE :

View File

@ -60,7 +60,7 @@ class Sabre_VObject_Element_MultiDateTime extends Sabre_VObject_Property {
$val[] = $i->format('Ymd\\THis');
}
$this->setValue(implode(',',$val));
$this->offsetSet('VALUE','DATETIME');
$this->offsetSet('VALUE','DATE-TIME');
break;
case Sabre_VObject_Element_DateTime::UTC :
$val = array();
@ -69,7 +69,7 @@ class Sabre_VObject_Element_MultiDateTime extends Sabre_VObject_Property {
$val[] = $i->format('Ymd\\THis\\Z');
}
$this->setValue(implode(',',$val));
$this->offsetSet('VALUE','DATETIME');
$this->offsetSet('VALUE','DATE-TIME');
break;
case Sabre_VObject_Element_DateTime::LOCALTZ :
$val = array();
@ -77,7 +77,7 @@ class Sabre_VObject_Element_MultiDateTime extends Sabre_VObject_Property {
$val[] = $i->format('Ymd\\THis');
}
$this->setValue(implode(',',$val));
$this->offsetSet('VALUE','DATETIME');
$this->offsetSet('VALUE','DATE-TIME');
$this->offsetSet('TZID', $dt[0]->getTimeZone()->getName());
break;
case Sabre_VObject_Element_DateTime::DATE :