note 29135 deleted from function.time by sean
| From: | sean@php.net | Date: | Sat, 23 Oct 2004 07:04:05 +0000 |
| Subject: | note 29135 deleted from function.time by sean | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-78986@lists.php.net to get a copy of this message | ||
Note Submitter: fischerlaender at certo-it dot de
----
Do not forget the brackets at the end of the time() function. If you do, time returns 1.1.1970. This
may cost you several hours of debugging - at least, it did me ...
// this prints out "1969-12-31" instead of yesterday's date
echo date("Y-m-d",(time-24*3600));
Stefan, http://www.certo-it.de