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.
This commit is contained in:
Andreas Fischer 2013-08-08 16:52:11 +02:00
parent 4c0ec974b9
commit 9c22046bff

View file

@ -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());