I'd like to add 2 values from MySQL database in an php app. One is stored as a Datetime type, the other one as Time.
$datetime; // "2013-02-08 14:00:00"
$time; // "01:00:00"
I'd like to add 1 hour to $datetime, this doesn't give me the correct result:
$newdatetime = strtotime($datetime) + strtotime($time);
echo date('Y-m-d H:i:s', $newdatetime); // "1920-02-11 08:31:44"
How can I do this correctly?