- mktime: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
function add_date($givendate,$hours) {
$cd = strtotime($givendate);
$newdate = date('Y-m-d h:i:s', mktime(date('h', $cd) + $hours));
return $newdate;
}
echo(date('Y/m/d H:i:s')."\n");