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:
parent
4c0ec974b9
commit
9c22046bff
1 changed files with 1 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue