get hour from datetime php code example
Example 1: php get hour
$hour = date('H:m:s');
echo $hour;
Example 2: add hour minute in datetime in php
$minutes_to_add = 5;
$time = new DateTime('2011-11-17 05:05');
$time->add(new DateInterval('PT' . $minutes_to_add . 'M'));
$stamp = $time->format('Y-m-d H:i');