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 6bd0aad117
commit b77132edbe

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;
}