From 3861e90336031873d7f6dc2f7476b5502af7d69f Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 31 Aug 2016 21:04:22 -0400 Subject: Fix wrong project date format (shown as 01/01/1970) --- app/Core/DateParser.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/Core/DateParser.php') diff --git a/app/Core/DateParser.php b/app/Core/DateParser.php index a7b10a7a..5d770241 100644 --- a/app/Core/DateParser.php +++ b/app/Core/DateParser.php @@ -304,6 +304,10 @@ class DateParser extends Base { foreach ($fields as $field) { if (! empty($values[$field])) { + if (! ctype_digit($values[$field])) { + $values[$field] = strtotime($values[$field]); + } + $values[$field] = date($format, $values[$field]); } else { $values[$field] = ''; -- cgit v1.2.3