1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-11-29 11:24:11 +01:00

Merge pull request #1005 from gvde/fix-birthday-dtstamp

Fix birthday dtstamp
This commit is contained in:
Georg Ehrke 2015-09-10 11:57:10 +02:00
commit 7f16042621

View File

@ -807,6 +807,9 @@ class Contact extends VObject\VCard implements IPIMObject {
);
$vEvent->DTSTART['VALUE'] = 'date';
$vEvent->add('DURATION', 'P1D');
$lm = new \DateTime('@' . $this->lastModified());
$lm->setTimeZone(new \DateTimeZone('UTC'));
$vEvent->DTSTAMP->setDateTime($lm);
$vEvent->{'UID'} = $this->UID;
$vEvent->{'RRULE'} = 'FREQ=YEARLY';
$vEvent->{'SUMMARY'} = $title . ' (' . $date->format('Y') . ')';