summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2011-06-23 17:54:49 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2011-06-23 17:54:49 -0400
commit467778d66fbde4023ef9a78c7137ac823db8c8d9 (patch)
tree41ae107323a9271e327bf7547957787988f6a250 /lib
parent8cbee2841604b614fe87d2e671ed15836f169a6e (diff)
parentd65f8bba73971e33a93e99d21ba791dec8056a28 (diff)
downloadnextcloud-server-467778d66fbde4023ef9a78c7137ac823db8c8d9.tar.gz
nextcloud-server-467778d66fbde4023ef9a78c7137ac823db8c8d9.zip
Merge branch 'master' into sharing
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php11
-rw-r--r--lib/filestorage.php2
2 files changed, 10 insertions, 3 deletions
diff --git a/lib/base.php b/lib/base.php
index 04f8f5c9fa4..e5b6656c2a9 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -236,8 +236,15 @@ class OC_UTIL {
* @param bool dateOnly option to ommit time from the result
*/
public static function formatDate( $timestamp,$dateOnly=false){
- $timeformat=$dateOnly?'F j, Y':'F j, Y, H:i';
- return date($timeformat,$timestamp);
+ if(isset($_SESSION['timezone'])){//adjust to clients timezone if we know it
+ $systemTimeZone = intval(exec('date +%z'));
+ $systemTimeZone=(round($systemTimeZone/100,0)*60)+($systemTimeZone%100);
+ $clientTimeZone=$_SESSION['timezone']*60;
+ $offset=$clientTimeZone-$systemTimeZone;
+ $timestamp=$timestamp+$offset*60;
+ }
+ $timeformat=$dateOnly?'F j, Y':'F j, Y, H:i';
+ return date($timeformat,$timestamp);
}
/**
diff --git a/lib/filestorage.php b/lib/filestorage.php
index d4db77f2c89..157e44ff298 100644
--- a/lib/filestorage.php
+++ b/lib/filestorage.php
@@ -386,7 +386,7 @@ class OC_FILESTORAGE_LOCAL extends OC_FILESTORAGE{
}
}
if($return=rmdir($dir)){
- $this->clearFolderSizeCache($path);
+ $this->clearFolderSizeCache($dir);
}
return $return;
}