I have the following code:
$now = date(\"Y-m-d H:m:s\"); $date = date(\"Y-m-d H:m:s\", strtotime(\'-24 hours\', $now));
However, now it
You can simply use time() to get the current timestamp.
time()
$date = date("Y-m-d H:m:s", strtotime('-24 hours', time()));