note 90800 added to function.date
| From: | toxaz0 at gmail dot com | Date: | Sun, 10 May 2009 19:16:46 +0000 |
| Subject: | note 90800 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-154417@lists.php.net to get a copy of this message | ||
Found out that in 28 years (after year 2037) the date() function will not work properly. Im not sure
though, that it is global or just on my box.
<?php
$secperyear = (60*60*24*365.25);
$arr = array();
for($i = 0; $i < 10; $i++) {
$arr[] = date('Y', (($i*10)*$secperyear));
}
echo implode(', ', $arr) . "\n";
?>
toxaz@shruikan ~ $ php test.php
1970, 1980, 1990, 2000, 2010, 2020, 2030, 1903, 1913, 1923
----
Server IP: 80.67.2.2
Probable Submitter: 90.230.117.142
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- https://master.php.net/note/edit/90800
Del: integrated -- https://master.php.net/note/delete/90800/integrated
Del: useless -- https://master.php.net/note/delete/90800/useless
Del: bad code -- https://master.php.net/note/delete/90800/bad+code
Del: spam -- https://master.php.net/note/delete/90800/spam
Del: non-english -- https://master.php.net/note/delete/90800/non-english
Del: in docs -- https://master.php.net/note/delete/90800/in+docs
Del: other reasons-- https://master.php.net/note/delete/90800
Reject -- https://master.php.net/note/reject/90800
Search -- https://master.php.net/manage/user-notes.php