I've tried multiple examples/questions around and so far I cannot get this to work. i am trying to take the current DateTime
, add 1 hour, then set the minutes to 30
. Here is what I have:
Current Time:
$date = date('Y-m-d h:i:s'); //this works and echos properly
Add hour:
$date->add(new DateInterval("PT1H"));
I receive the following error
Call to a member function add() on a non-object
Then once that is done I'm planning to add:
$date->format('Y-m-d h:30:00'); //commented out on my script until I get the above piece working.