From 3298768d957421743eaa56dec5381141ab094d53 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 10 Jan 2014 00:47:40 -0800 Subject: directory creation error, display localtimes on cloud webpage, doc updates --- include/reddav.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/reddav.php') diff --git a/include/reddav.php b/include/reddav.php index 2aedeed04..b2683885d 100644 --- a/include/reddav.php +++ b/include/reddav.php @@ -674,6 +674,7 @@ class RedBasicAuth extends Sabre\DAV\Auth\Backend\AbstractBasic { public $browser; public $owner_id; public $owner_nick = ''; + public $timezone; protected function validateUserPass($username, $password) { require_once('include/auth.php'); @@ -758,6 +759,9 @@ class RedBrowser extends DAV\Browser\Plugin { public function generateDirectoryIndex($path) { + if($this->auth->timezone) + date_default_timezone_set($this->auth->timezone); + $version = ''; $html = " @@ -852,7 +856,7 @@ class RedBrowser extends DAV\Browser\Plugin { if (!$type) $type = 'Unknown'; $size = isset($file[200]['{DAV:}getcontentlength'])?(int)$file[200]['{DAV:}getcontentlength']:''; - $lastmodified = isset($file[200]['{DAV:}getlastmodified'])?$file[200]['{DAV:}getlastmodified']->getTime()->format(\DateTime::ATOM):''; + $lastmodified = ((isset($file[200]['{DAV:}getlastmodified']))? $file[200]['{DAV:}getlastmodified']->getTime()->format('Y-m-d H:i:s') :''); $fullPath = DAV\URLUtil::encodePath('/' . trim($this->server->getBaseUri() . ($path?$path . '/':'') . $name,'/')); @@ -882,7 +886,7 @@ class RedBrowser extends DAV\Browser\Plugin { {$displayName} {$type} {$size} - {$lastmodified} + " . datetime_convert('UTC', date_default_timezone_get(),$lastmodified) . " "; } -- cgit v1.2.3