[PHP-DEV] PHP 4.0 Bug #4454: mktime() returns -1 if year is less than 1970 From: ed <email protected>
Date: 05/15/00

From: ed <email protected>
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));

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>