|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-08-25 09:37 UTC] jay@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 17 08:00:01 2025 UTC |
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"; ?>