[Pkg-owncloud-commits] [owncloud] 02/52: Use DateTime object instead of fixed format date string.

David Prévot taffit at moszumanska.debian.org
Mon Dec 2 01:49:36 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit a330b2ef9b8f3e755be0260832ba8db01c62a515
Author: Andreas Fischer <bantu at owncloud.com>
Date:   Tue Nov 26 12:00:31 2013 +0100

    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.
---
 lib/public/share.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/public/share.php b/lib/public/share.php
index e887740..708adba 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();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list