rely only on php DateTime to parse the db datetime string
This commit is contained in:
parent
1292793c4b
commit
6408125edc
1 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue