diff options
author | Andreas Fischer <bantu@owncloud.com> | 2013-11-26 12:00:31 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@owncloud.com> | 2013-11-26 12:00:31 +0100 |
commit | a330b2ef9b8f3e755be0260832ba8db01c62a515 (patch) | |
tree | baf8aaf7709e853ab7f31993c3bbb411e96c2caa /lib/public/share.php | |
parent | 9fb1da28110192422e7ca7ee8b0fe6996687d3c0 (diff) | |
download | nextcloud-server-a330b2ef9b8f3e755be0260832ba8db01c62a515.tar.gz nextcloud-server-a330b2ef9b8f3e755be0260832ba8db01c62a515.zip |
Use DateTime object instead of fixed format date string.
Use a DateTime object and have conversion handled by Doctrine instead of using
a date string with a fixed format.
Diffstat (limited to 'lib/public/share.php')
-rw-r--r-- | lib/public/share.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index e887740ac4c..708adba4237 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -823,10 +823,9 @@ class Share { $date = null; } else { $date = new \DateTime($date); - $date = date('Y-m-d H:i', $date->format('U') - $date->getOffset()); } $query = \OC_DB::prepare('UPDATE `*PREFIX*share` SET `expiration` = ? WHERE `id` = ?'); - $query->bindValue(1, $date); + $query->bindValue(1, $date, 'datetime'); foreach ($items as $item) { $query->bindValue(2, (int) $item['id']); $query->execute(); |