summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-03-12 14:23:53 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-03-12 15:16:52 +0100
commit44289ff134e9387bf2bce70f1d716b0e924f2021 (patch)
treed3c62559bb1769b8ff9d1c62cfbf8351c42a0b66 /lib/private
parentaf89db3407e599ea47d62a851759fa929cdd4713 (diff)
downloadnextcloud-server-44289ff134e9387bf2bce70f1d716b0e924f2021.tar.gz
nextcloud-server-44289ff134e9387bf2bce70f1d716b0e924f2021.zip
Use proper method to format absolute timestamp
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/legacy/util.php23
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php
index 7e083b2ba0e..3313ccdec91 100644
--- a/lib/private/legacy/util.php
+++ b/lib/private/legacy/util.php
@@ -679,29 +679,6 @@ class OC_Util {
}
/**
- * formats a timestamp in the "right" way
- *
- * @param int $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
- *
- * @deprecated Use \OC::$server->query('DateTimeFormatter') instead
- */
- public static function formatDate($timestamp, $dateOnly = false, $timeZone = null) {
- if ($timeZone !== null && !$timeZone instanceof \DateTimeZone) {
- $timeZone = new \DateTimeZone($timeZone);
- }
-
- /** @var \OC\DateTimeFormatter $formatter */
- $formatter = \OC::$server->query('DateTimeFormatter');
- if ($dateOnly) {
- return $formatter->formatDate($timestamp, 'long', $timeZone);
- }
- return $formatter->formatDateTime($timestamp, 'long', 'long', $timeZone);
- }
-
- /**
* check if the current server configuration is suitable for ownCloud
*
* @param \OC\SystemConfig $config