]> source.dussan.org Git - nextcloud-server.git/commitdiff
rely only on php DateTime to parse the db datetime string
authorJörn Friedrich Dreyer <jfd@butonic.de>
Thu, 12 Dec 2013 18:09:21 +0000 (19:09 +0100)
committerBjoern Schiessle <schiessle@owncloud.com>
Fri, 13 Dec 2013 15:38:05 +0000 (16:38 +0100)
lib/public/share.php

index 6b3397c85c63b150b97ec8183265e12ac8f711e1..f0fd8e1ab1bc7d26fa42ba46b281bd25128bcf1a 100644 (file)
@@ -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;
                        }