How to add hours and seconds to specific date in PHP

1 Answer

0 votes
$date = new DateTime('2016-06-13');
$date->add(new DateInterval('PT10H30S'));
echo $date->format('Y-m-d H:i:s')
 
/*
run: 

2016-06-13 10:00:30 

*/

 



answered Jun 13, 2016 by avibootz
...