T2504: Fix DTSTAMP in iTip replies

It should be set to NOW whenever METHOD is specified.
This commit is contained in:
Aleksander Machniak 2017-06-29 13:08:35 +00:00
parent 2ad0d6651d
commit c2e8cc16ab

View file

@ -1002,7 +1002,7 @@ class libvcalendar implements Iterator
$ve->UID = $event['uid'];
// set DTSTAMP according to RFC 5545, 3.8.7.2.
$dtstamp = !empty($event['changed']) && !empty($this->method) ? $event['changed'] : new DateTime('now', new \DateTimeZone('UTC'));
$dtstamp = !empty($event['changed']) && empty($this->method) ? $event['changed'] : new DateTime('now', new \DateTimeZone('UTC'));
$ve->DTSTAMP = $this->datetime_prop($cal, 'DTSTAMP', $dtstamp, true);
// all-day events end the next day