Answers for "new DateInterval 1 hour"

PHP
0

new DateInterval 1 hour

$time = 'Tue May 15 10:14:30 +0000 2012';
$dt = new DateTime($time);
$dt->add(new DateInterval('PT1H'));
Posted by: Guest on March-08-2021

Browse Popular Code Answers by Language