In PHP, how could I create a variable called $livetime that equals the current time minus 1 hour?
$livetime
convert your date to strtotime and then subtract one hour from it
$now = date('Y-m-d H:i:s'); $time = strtotime($now); $time = $time - (60*60); //one hour $beforeOneHour = date("Y-m-d H:i:s", $time);