diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-12-10 14:48:59 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-12-10 14:48:59 +0100 |
commit | fd2599cfc2ae213d992b9711981f9899d314d0df (patch) | |
tree | 76b822e1bc1913a39d85f4df1b469fc3c0fec3c3 /lib/private/l10n.php | |
parent | 269ae49c1c5723031386ce5d706282acc7fef6da (diff) | |
parent | 67335ccddfc49696f592e96d690f3e693fd36e98 (diff) | |
download | nextcloud-server-fd2599cfc2ae213d992b9711981f9899d314d0df.tar.gz nextcloud-server-fd2599cfc2ae213d992b9711981f9899d314d0df.zip |
Merge pull request #12485 from owncloud/jenkins-12383
New DateTimeFormatter class for dates in other timezones and languages
Diffstat (limited to 'lib/private/l10n.php')
-rw-r--r-- | lib/private/l10n.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/l10n.php b/lib/private/l10n.php index bc4e53e975c..3c759a9e3a2 100644 --- a/lib/private/l10n.php +++ b/lib/private/l10n.php @@ -311,7 +311,13 @@ class OC_L10N implements \OCP\IL10N { } else { $value->setTimestamp($data); } - $locale = self::findLanguage(); + + // Use the language of the instance, before falling back to the current user's language + $locale = $this->lang; + if ($locale === null) { + $locale = self::findLanguage(); + } + $options = array_merge(array('width' => 'long'), $options); $width = $options['width']; switch($type) { |