From 6408125edcb648661f4dd42e8fa1233dcbdf262b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= <jfd@butonic.de>
Date: Thu, 12 Dec 2013 19:09:21 +0100
Subject: [PATCH] rely only on php DateTime to parse the db datetime string

---
 lib/public/share.php | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/public/share.php b/lib/public/share.php
index 6b3397c85c..f0fd8e1ab1 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;
 			}
-- 
GitLab