diff options
author | Frank Karlitschek <karlitschek@kde.org> | 2011-04-16 20:34:18 +0200 |
---|---|---|
committer | Frank Karlitschek <karlitschek@kde.org> | 2011-04-16 20:34:18 +0200 |
commit | 1372d8339d78c01b1514708f26520e244cc991e2 (patch) | |
tree | ea44cc204bc8103ca84fbb7d37e8dc87efaa8952 /lib | |
parent | cf50c497b92f59f8252e1d8a7f3413c8d880df6d (diff) | |
download | nextcloud-server-1372d8339d78c01b1514708f26520e244cc991e2.tar.gz nextcloud-server-1372d8339d78c01b1514708f26520e244cc991e2.zip |
add a date format function for more eyecandy
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 12 | ||||
-rw-r--r-- | lib/ocsclient.php | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php index 93d6fb66c7e..8504518dbfb 100644 --- a/lib/base.php +++ b/lib/base.php @@ -222,6 +222,18 @@ class OC_UTIL { self::$styles[] = "$application/css/$file"; } + /** + * formats a timestamp in the "right" way + * + * @param timestamp $timestamp + */ + public static function formatDate( $timestamp ){ + $timeformat='F j, Y, H:i'; + return date($timeformat,$timestamp); + } + + + /** * check if the current server configuration is suitable for ownCloud * @return array arrays with error messages and hints diff --git a/lib/ocsclient.php b/lib/ocsclient.php index e58a210077e..d9ce11d537e 100644 --- a/lib/ocsclient.php +++ b/lib/ocsclient.php @@ -74,7 +74,7 @@ class OC_OCSCLIENT{ $app['personid']=$tmp[$i]->personid; $app['detailpage']=$tmp[$i]->detailpage; $app['preview']=$tmp[$i]->smallpreviewpic1; - $app['changed']=$tmp[$i]->changed; + $app['changed']=strtotime($tmp[$i]->changed); $app['description']=$tmp[$i]->description; $apps[]=$app; |