I have an input field which will return a timestamp e.g. 2007-12-01 18:00:00, and i want before adding the specific date/time, to add 10 hours....so the final inpou should be 2007-12-02 04:00:00 . How can i do that?
$inputTime = '2007-12-01 18:00:00'; $plusTenHours = date('Y-m-d H:i:s', strtotime($inputTime . ' + 10 hours'));
excellent thanks!
just for others that might want to use this... -10 hours will not work. instead you should use 10 hours ago