diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-08-31 21:04:22 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-08-31 21:04:22 -0400 |
commit | 3861e90336031873d7f6dc2f7476b5502af7d69f (patch) | |
tree | 6cfcf590b3dd307e639025e5cd272d57232245ba /app/Core/DateParser.php | |
parent | 12acf66ad2a2673dd3201c85d4179b6c46f3c12f (diff) |
Fix wrong project date format (shown as 01/01/1970)
Diffstat (limited to 'app/Core/DateParser.php')
-rw-r--r-- | app/Core/DateParser.php | 4 |
1 files changed, 4 insertions, 0 deletions
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] = ''; |