rely only on php DateTime to parse the db datetime string

remotes/origin/ldap_group_count
Jörn Friedrich Dreyer 12 years ago committed by Bjoern Schiessle
parent 1292793c4b
commit 6408125edc
  1. 5
      lib/public/share.php

@ -850,9 +850,8 @@ class Share {
protected static function expireItem(array $item) {
if (!empty($item['expiration'])) {
$now = new \DateTime();
$expirationDate = \Doctrine\DBAL\Types\Type::getType('datetime')
->convertToPhpValue($item['expiration'], \OC_DB::getConnection()->getDatabasePlatform());
if ($now > $expirationDate) {
$expires = new \DateTime($item['expiration']);
if ($now > $expires) {
self::unshareItem($item);
return true;
}

Loading…
Cancel
Save