I have a date variable in PHP and I want to add one hour to it. What is the code for adding one hour to the PHP date?
You should convert the date into time and then add convert the 60 minute (one hour) into time.
Then add the both to get and convert it to date. This way you can achieve the result.
$currentTime = time($todayDate); //Add one hour equavelent seconds 60*60 $timeAfterOneHour = $currentTime+60*60;
Check the tutorial Adding one hour in php.