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

set DTSTAMP for birthday event to date of last contact modification

Set DTSTAMP to UTC
This commit is contained in:
Gerald Vogt 2015-07-24 16:16:49 +02:00
parent 111873b948
commit ce7ef7d420

View File

@ -779,6 +779,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') . ')';