How do I get PHP Date Time from a JSON
?
$params = array();
$content = json_decode($request->getContent(), true);
if(empty($content))
{
throw $this->createNotFoundException('JSON not send!')
}
$content['date']
need to be smomething like $date = new DateTime();
JSON looks like :
{
"date" : "2017-02-15 15:20:14"
}