From:             alain at valain dot com
Operating system: Linux Redhat 7.3
PHP version:      4.3.2
PHP Bug Type:     Date/time related
Bug description:  strtotime() fails on dates < Jan 1 1970

Description:
------------
The strtotime() function fails with -1 on dates that are < Jan 1 1970.

This makes other PHP functions like date() to return 
Jan 1 1970
on the "faulty" timestamp -1.

Reproduce code:
---------------
<?php

$usernaiss = date("d/m/Y", strtotime("Dec 31 1969 12:00AM"));

echo "<html>\n";
echo "<head></head>\n";
echo "<body>\n";
echo "Date de naissance: " . $usernaiss . "<br>\n";
echo "</body>\n";
echo "</html>\n";
?>



-- 
Edit bug report at http://bugs.php.net/?id=25233&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25233&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25233&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25233&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25233&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25233&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25233&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25233&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25233&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25233&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25233&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25233&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25233&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25233&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25233&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25233&r=gnused

Reply via email to