From: Jörn Friedrich Dreyer Date: Thu, 12 Dec 2013 18:09:21 +0000 (+0100) Subject: rely only on php DateTime to parse the db datetime string X-Git-Tag: v7.0.0alpha2~1037 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6408125edcb648661f4dd42e8fa1233dcbdf262b;p=nextcloud-server.git rely only on php DateTime to parse the db datetime string --- diff --git a/lib/public/share.php b/lib/public/share.php index 6b3397c85c6..f0fd8e1ab1b 100644 --- a/lib/public/share.php +++ b/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; }