note 47183 deleted from function.mktime by tomsommer
| From: | tomsommer@php.net | Date: | Sun, 07 Nov 2004 20:27:23 +0000 |
| Subject: | note 47183 deleted from function.mktime by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-80240@lists.php.net to get a copy of this message | ||
Note Submitter: Raphael Kirchner
----
@Evorg, expiration date in "the past"
By using mktime(1,0,0,1, 1, 1990) to get a timestamp that's "in the past" you're
only almost there: You could use mktime(1,0,0,1, 1, 1970) which is even more "in the
past". And this returns the timestamp 0 (zero) because it's defined as the starting point
of timestamp counting (Thu 1970-01-01 01:00:00). So you can (and should) dump the unnecessary
function call and directly define the "expired in the past"-timestamp as 0. BTW: You
should't go beyond that (i.e. negative timestamp values) because not all systems support that.