summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-12-12 19:09:21 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2013-12-13 16:38:05 +0100
commit6408125edcb648661f4dd42e8fa1233dcbdf262b (patch)
tree07eeaea6032a66f20bd7d87294e42fcaa858c734 /lib/public
parent1292793c4b4b9335779b5a907fe7c7fdf65a25ca (diff)
downloadnextcloud-server-6408125edcb648661f4dd42e8fa1233dcbdf262b.tar.gz
nextcloud-server-6408125edcb648661f4dd42e8fa1233dcbdf262b.zip
rely only on php DateTime to parse the db datetime string
Diffstat (limited to 'lib/public')
-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;
}