SyntaxFix
Write A Post
Hire A Developer
Questions
An other solution (object-oriented) is to use DateTime::add
Example:
$now = new DateTime(); //current date/time $now->add(new DateInterval("PT{$hours}H")); $new_time = $now->format('Y-m-d H:i:s');
PHP documentation.