From ce7ef7d42068791f53009eae58998494f4c8288a Mon Sep 17 00:00:00 2001 From: Gerald Vogt Date: Fri, 24 Jul 2015 16:16:49 +0200 Subject: [PATCH] set DTSTAMP for birthday event to date of last contact modification Set DTSTAMP to UTC --- lib/contact.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/contact.php b/lib/contact.php index bcc71e4a..5ad3b606 100644 --- a/lib/contact.php +++ b/lib/contact.php @@ -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') . ')';