The second parameter dateis the unix timestamp, which is in seconds, so the number of your hours is 3600 (3600 seconds per hour).
$hours1 = 403440 * 3600;
$date1 = date("d-m-Y H:i:s", $hours1);
echo $date1;
Output:
09-01-2016 19:00:00
For updating your code should be:
$date2 = strtotime('2016/01/10');
$hours1 = 403440 * 3600;
echo ($date2 - $hours1)/3600;
Output:
5
source
share