summaryrefslogtreecommitdiffstats
path: root/lib/l10n.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2013-08-08 16:52:11 +0200
committerAndreas Fischer <bantu@owncloud.com>2013-08-09 22:32:38 +0200
commit9c22046bffac523e1eff12d7eff7409c786de176 (patch)
tree767a33f80ca56e6e36ab062161eb5cc3e83efb42 /lib/l10n.php
parent4c0ec974b9a8b97625695edd136e1f805af0bf31 (diff)
downloadnextcloud-server-9c22046bffac523e1eff12d7eff7409c786de176.tar.gz
nextcloud-server-9c22046bffac523e1eff12d7eff7409c786de176.zip
Do not pass numeric strings to strtotime() when formatting dates.
strtotime() will return false and the date will be formatted as the 0-timestamp (e.g. January 1, 1970 00:00) otherwise.
Diffstat (limited to 'lib/l10n.php')
-rw-r--r--lib/l10n.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/l10n.php b/lib/l10n.php
index d2da302b644..5cfe119a4ff 100644
--- a/lib/l10n.php
+++ b/lib/l10n.php
@@ -387,7 +387,7 @@ class OC_L10N {
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());