From 656f4306325d7944280ce111d95aeaeacab8d3cd Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 5 Jun 2016 21:28:56 -0400 Subject: Changed DateParser to use only user format and ISO-8601 --- app/Controller/TaskModificationController.php | 5 ++--- app/Controller/TaskViewController.php | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'app/Controller') diff --git a/app/Controller/TaskModificationController.php b/app/Controller/TaskModificationController.php index fc9113dd..50583df4 100644 --- a/app/Controller/TaskModificationController.php +++ b/app/Controller/TaskModificationController.php @@ -91,11 +91,10 @@ class TaskModificationController extends BaseController $values = $task; $values = $this->hook->merge('controller:task:form:default', $values, array('default_values' => $values)); $values = $this->hook->merge('controller:task-modification:form:default', $values, array('default_values' => $values)); + $values = $this->dateParser->format($values, array('date_due'), $this->dateParser->getUserDateFormat()); + $values = $this->dateParser->format($values, array('date_started'), $this->dateParser->getUserDateTimeFormat()); } - $values = $this->dateParser->format($values, array('date_due'), $this->configModel->get('application_date_format', DateParser::DATE_FORMAT)); - $values = $this->dateParser->format($values, array('date_started'), $this->configModel->get('application_datetime_format', DateParser::DATE_TIME_FORMAT)); - $this->response->html($this->template->render('task_modification/edit_task', array( 'project' => $project, 'values' => $values, diff --git a/app/Controller/TaskViewController.php b/app/Controller/TaskViewController.php index 2a79ee45..073434b2 100644 --- a/app/Controller/TaskViewController.php +++ b/app/Controller/TaskViewController.php @@ -70,7 +70,7 @@ class TaskViewController extends BaseController 'time_spent' => $task['time_spent'] ?: '', ); - $values = $this->dateParser->format($values, array('date_started'), $this->configModel->get('application_datetime_format', DateParser::DATE_TIME_FORMAT)); + $values = $this->dateParser->format($values, array('date_started'), $this->dateParser->getUserDateTimeFormat()); $this->response->html($this->helper->layout->task('task/show', array( 'task' => $task, -- cgit v1.2.3