1 2 3 4 5 6 7 8 9
<?php echo $rounded = date('H:i:s', ceil(strtotime('16:41:34')/1800)*1800); ?>
1
17:00:00