setDate sets the date in a DateTime object.
setDate
$date = new DateTime(); $date->setDate(2016, 7, 25);
this example sets the date to be the twenty-fifth of July, 2015, it will produce the following result:
2016-07-25 17:52:15.819442