summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOwen Winkler <a_github@midnightcircus.com>2013-08-09 16:05:01 -0700
committerOwen Winkler <a_github@midnightcircus.com>2013-08-09 16:05:01 -0700
commit4128561f2265938fb4de4ed34873c594919dca35 (patch)
tree1c8778926a2e36f7a3e86273795ad0b5118b9355 /lib
parent4c0ec974b9a8b97625695edd136e1f805af0bf31 (diff)
parent0e3dea7111e66c3619c6fe989e79ff80fb18e2b3 (diff)
downloadnextcloud-server-4128561f2265938fb4de4ed34873c594919dca35.tar.gz
nextcloud-server-4128561f2265938fb4de4ed34873c594919dca35.zip
Merge pull request #4360 from owncloud/format-date-numeric-strings
Do not pass numeric strings to strtotime() when formatting dates.
Diffstat (limited to 'lib')
-rw-r--r--lib/l10n.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/l10n.php b/lib/l10n.php
index d2da302b644..f93443b886a 100644
--- a/lib/l10n.php
+++ b/lib/l10n.php
@@ -386,8 +386,7 @@ class OC_L10N {
case 'time':
if($data instanceof DateTime) {
return $data->format($this->localizations[$type]);
- }
- elseif(is_string($data)) {
+ } elseif(is_string($data) && !is_numeric($data)) {
$data = strtotime($data);
}
$locales = array(self::findLanguage());