diff options
author | Andreas Fischer <bantu@owncloud.com> | 2013-11-26 12:21:31 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@owncloud.com> | 2013-11-26 12:21:31 +0100 |
commit | 3bbaba1ecae1f5322fcc594d40d707edadc95446 (patch) | |
tree | 6238d13c3326d52e2b819281708275ab8c6f5e4c | |
parent | a330b2ef9b8f3e755be0260832ba8db01c62a515 (diff) | |
download | nextcloud-server-3bbaba1ecae1f5322fcc594d40d707edadc95446.tar.gz nextcloud-server-3bbaba1ecae1f5322fcc594d40d707edadc95446.zip |
Use the Doctrine to convert date string to DateTime object.
-rw-r--r-- | lib/public/share.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index 708adba4237..86b6cfa46ad 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -844,7 +844,8 @@ class Share { protected static function expireItem(array $item) { if (!empty($item['expiration'])) { $now = new \DateTime(); - $expirationDate = new \DateTime($item['expiration'], new \DateTimeZone('UTC')); + $expirationDate = \Doctrine\DBAL\Types\Type::getType('datetime') + ->convertToPhpValue($item['expiration'], \OC_DB::getConnection()->getDatabasePlatform()); if ($now > $expirationDate) { self::unshareItem($item); return true; |