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>
This commit is contained in:
parent
b0e23a1634
commit
71706282f7
|
@ -70,20 +70,20 @@ class Sabre_VObject_Element_DateTime extends Sabre_VObject_Property {
|
||||||
$this->setValue($dt->format('Ymd\\THis'));
|
$this->setValue($dt->format('Ymd\\THis'));
|
||||||
$this->offsetUnset('VALUE');
|
$this->offsetUnset('VALUE');
|
||||||
$this->offsetUnset('TZID');
|
$this->offsetUnset('TZID');
|
||||||
$this->offsetSet('VALUE','DATETIME');
|
$this->offsetSet('VALUE','DATE-TIME');
|
||||||
break;
|
break;
|
||||||
case self::UTC :
|
case self::UTC :
|
||||||
$dt->setTimeZone(new DateTimeZone('UTC'));
|
$dt->setTimeZone(new DateTimeZone('UTC'));
|
||||||
$this->setValue($dt->format('Ymd\\THis\\Z'));
|
$this->setValue($dt->format('Ymd\\THis\\Z'));
|
||||||
$this->offsetUnset('VALUE');
|
$this->offsetUnset('VALUE');
|
||||||
$this->offsetUnset('TZID');
|
$this->offsetUnset('TZID');
|
||||||
$this->offsetSet('VALUE','DATETIME');
|
$this->offsetSet('VALUE','DATE-TIME');
|
||||||
break;
|
break;
|
||||||
case self::LOCALTZ :
|
case self::LOCALTZ :
|
||||||
$this->setValue($dt->format('Ymd\\THis'));
|
$this->setValue($dt->format('Ymd\\THis'));
|
||||||
$this->offsetUnset('VALUE');
|
$this->offsetUnset('VALUE');
|
||||||
$this->offsetUnset('TZID');
|
$this->offsetUnset('TZID');
|
||||||
$this->offsetSet('VALUE','DATETIME');
|
$this->offsetSet('VALUE','DATE-TIME');
|
||||||
$this->offsetSet('TZID', $dt->getTimeZone()->getName());
|
$this->offsetSet('TZID', $dt->getTimeZone()->getName());
|
||||||
break;
|
break;
|
||||||
case self::DATE :
|
case self::DATE :
|
||||||
|
|
|
@ -60,7 +60,7 @@ class Sabre_VObject_Element_MultiDateTime extends Sabre_VObject_Property {
|
||||||
$val[] = $i->format('Ymd\\THis');
|
$val[] = $i->format('Ymd\\THis');
|
||||||
}
|
}
|
||||||
$this->setValue(implode(',',$val));
|
$this->setValue(implode(',',$val));
|
||||||
$this->offsetSet('VALUE','DATETIME');
|
$this->offsetSet('VALUE','DATE-TIME');
|
||||||
break;
|
break;
|
||||||
case Sabre_VObject_Element_DateTime::UTC :
|
case Sabre_VObject_Element_DateTime::UTC :
|
||||||
$val = array();
|
$val = array();
|
||||||
|
@ -69,7 +69,7 @@ class Sabre_VObject_Element_MultiDateTime extends Sabre_VObject_Property {
|
||||||
$val[] = $i->format('Ymd\\THis\\Z');
|
$val[] = $i->format('Ymd\\THis\\Z');
|
||||||
}
|
}
|
||||||
$this->setValue(implode(',',$val));
|
$this->setValue(implode(',',$val));
|
||||||
$this->offsetSet('VALUE','DATETIME');
|
$this->offsetSet('VALUE','DATE-TIME');
|
||||||
break;
|
break;
|
||||||
case Sabre_VObject_Element_DateTime::LOCALTZ :
|
case Sabre_VObject_Element_DateTime::LOCALTZ :
|
||||||
$val = array();
|
$val = array();
|
||||||
|
@ -77,7 +77,7 @@ class Sabre_VObject_Element_MultiDateTime extends Sabre_VObject_Property {
|
||||||
$val[] = $i->format('Ymd\\THis');
|
$val[] = $i->format('Ymd\\THis');
|
||||||
}
|
}
|
||||||
$this->setValue(implode(',',$val));
|
$this->setValue(implode(',',$val));
|
||||||
$this->offsetSet('VALUE','DATETIME');
|
$this->offsetSet('VALUE','DATE-TIME');
|
||||||
$this->offsetSet('TZID', $dt[0]->getTimeZone()->getName());
|
$this->offsetSet('TZID', $dt[0]->getTimeZone()->getName());
|
||||||
break;
|
break;
|
||||||
case Sabre_VObject_Element_DateTime::DATE :
|
case Sabre_VObject_Element_DateTime::DATE :
|
||||||
|
|
Loading…
Reference in New Issue