diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-04-16 12:21:12 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-04-16 12:21:48 +0200 |
commit | 5720bd296dbd5f0459ea53c12d488999193801da (patch) | |
tree | 6bb24f9174ee5db421f3a0d0c4d635ecc00d983b /lib/util.php | |
parent | 70d0103a675fca4896974f1d59f5e76365304159 (diff) | |
download | nextcloud-server-5720bd296dbd5f0459ea53c12d488999193801da.tar.gz nextcloud-server-5720bd296dbd5f0459ea53c12d488999193801da.zip |
merge log into admin
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/util.php b/lib/util.php index 2ea392ec31d..02ac2e505fa 100644 --- a/lib/util.php +++ b/lib/util.php @@ -129,23 +129,23 @@ class OC_Util { self::$headers[]=array('tag'=>$tag,'attributes'=>$attributes,'text'=>$text); } - /** - * formats a timestamp in the "right" way - * - * @param int timestamp $timestamp - * @param bool dateOnly option to ommit time from the result - */ - public static function formatDate( $timestamp,$dateOnly=false){ - if(isset($_SESSION['timezone'])){//adjust to clients timezone if we know it - $systemTimeZone = intval(date('O')); - $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); - } + /** + * formats a timestamp in the "right" way + * + * @param int timestamp $timestamp + * @param bool dateOnly option to ommit time from the result + */ + public static function formatDate( $timestamp,$dateOnly=false){ + if(isset($_SESSION['timezone'])){//adjust to clients timezone if we know it + $systemTimeZone = intval(date('O')); + $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); + } /** * Shows a pagenavi widget where you can jump to different pages. |