I am using the date_create_from_format function for dates
<?php $tiempo_pregunta = date_create_from_format('Y-m-d H:i:s', $pregunta->fecha." ".$pregunta->hora); ?>
But the problem is that the apache does not recognize that php function, check the configuration and that the library to use that function is installed, also check that the library is compatible with the version of php that has installed the server and yes it is.
Why is this happening?