1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-18 07:52:21 +01:00

Contacts: Save last-modified time in REV property if not set

This commit is contained in:
Bart Visscher 2012-02-12 15:13:30 +01:00
parent fad50a1c5b
commit 969e364d17

View File

@ -97,6 +97,10 @@ class OC_Contacts_App {
$vcard->setString('N', 'Unknown;Name;;;');
}
}
if (!is_null($vcard) && !isset($vcard->REV)) {
$rev = new DateTime('@'.$card['lastmodified']);
$vcard->setString('REV', $rev->format(DateTime::W3C));
}
return $vcard;
}