PHP 4.0 Bug #4454: mktime() returns -1 if year is less than 1970
| From: | ed at linkstream dot net | Date: | Mon, 15 May 2000 16:02:21 +0000 |
| Subject: | PHP 4.0 Bug #4454: mktime() returns -1 if year is less than 1970 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-18770@lists.php.net to get a copy of this message | ||
From: ed@linkstream.net
Operating system: NT 4.0 (SP4)
PHP version: 4.0 Release Candidate 2
PHP Bug Type: Scripting Engine problem
Bug description: mktime() returns -1 if year is less than 1970
mktime() returns with -1 if year is less than 1970. If embedded in a call to the date() function, it
will crash the scripting engine.
this call will return -1:
mktime(0,0,0,10,24,1969);
this call returns valid timestamp:
mktime(0,0,0,10,24,1970);
this will crash the PHP engine:
date("l, jS F, Y", mktime(0,0,0,10,24,1969));