For PHP> 5.3, you can use the DateInterval class for the DateTime object, which seems to me to be the easiest way to handle the complexity of time calculations. So in your case, you can do something like this:
$time = new \DateTime("2011-08-04 15:00:01");
$time->add(new \DateInterval('PT6H'));
echo $time->format('Y-m-d H:i:s');
Link
source
share