note 40559 deleted from function.date by tomsommer
| From: | tomsommer@php.net | Date: | Fri, 10 Sep 2004 18:17:42 +0000 |
| Subject: | note 40559 deleted from function.date by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-76421@lists.php.net to get a copy of this message | ||
Note Submitter: serial_66 at yahoo dot com
----
The easiest way to find a time recentry passed, such as seconds or hours seems to be to use time()
and then subtract the amount of seconds you want, and then turn it in to a date format.
Example:
$now = time();
$anhourago = $now - 3600;
$anhourago_date = $date = date("Y-m-d H:i:s",$anhourago);