Skip to content

Commit

Permalink
[MOD] fixed date
Browse files Browse the repository at this point in the history
  • Loading branch information
lcp0578 committed May 29, 2019
1 parent 10b7e3c commit d6abc85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Form/DataTransformer/DateTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DateTransformer implements DataTransformerInterface
public function transform($dateTime)
{
if($dateTime instanceof \DateTime){
return $dateTime->format('Y-m-d H:i:s');
return $dateTime->format('Y-m-d');
}

return $dateTime;
Expand Down
2 changes: 1 addition & 1 deletion Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ services:
Kit\FormBundle\Form\DataTransformer\DateTransformer: "@kit_form.form.data_transformer_date"
kit_form.form.datatime_transformer_date:
class: Kit\FormBundle\Form\DataTransformer\DateTimeTransformer
Kit\FormBundle\Form\DataTransformer\DateTransformer: "@kit_form.form.datatime_transformer_date"
Kit\FormBundle\Form\DataTransformer\DateTimeTransformer: "@kit_form.form.datatime_transformer_date"

0 comments on commit d6abc85

Please sign in to comment.