From 9c22046bffac523e1eff12d7eff7409c786de176 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 8 Aug 2013 16:52:11 +0200 Subject: [PATCH] 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. --- lib/l10n.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); -- 2.39.5