aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-09-23 13:45:21 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-09-23 13:45:21 +0200
commitc587a4aaa212a48aca0b34fc2f9625774e02c472 (patch)
tree125b5ba8c98d5137e63e71c003135a9b338586d9 /lib/public
parenta062db4fd02feb1a0eff48eb130da7cc48c49899 (diff)
parent814114ab8eda5d383f4c620f3854cfefcdb6895d (diff)
downloadnextcloud-server-c587a4aaa212a48aca0b34fc2f9625774e02c472.tar.gz
nextcloud-server-c587a4aaa212a48aca0b34fc2f9625774e02c472.zip
Merge pull request #11222 from owncloud/store-users-timezone-master
send browsers timezone back tp the server on login
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/util.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/public/util.php b/lib/public/util.php
index 244c11ba2cc..35847fce38a 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -29,6 +29,7 @@
// use OCP namespace for all classes that are considered public.
// This means that they should be used by apps instead of the internal ownCloud classes
namespace OCP;
+use DateTimeZone;
/**
* This class provides different helper functions to make the life of a developer easier
@@ -167,10 +168,11 @@ class Util {
* formats a timestamp in the "right" way
* @param int $timestamp $timestamp
* @param bool $dateOnly option to omit time from the result
+ * @param DateTimeZone|string $timeZone where the given timestamp shall be converted to
* @return string timestamp
*/
- public static function formatDate( $timestamp, $dateOnly=false) {
- return(\OC_Util::formatDate( $timestamp, $dateOnly ));
+ public static function formatDate($timestamp, $dateOnly=false, $timeZone = null) {
+ return(\OC_Util::formatDate($timestamp, $dateOnly, $timeZone));
}
/**