summaryrefslogtreecommitdiffstats
path: root/lib/public/share.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/share.php')
-rw-r--r--lib/public/share.php5
1 files changed, 2 insertions, 3 deletions
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;
}