note 90800 rejected from function.date by danbrown

From: Date: Sun, 10 May 2009 21:39:14 +0000
Subject: note 90800 rejected from function.date by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-154420@lists.php.net to get a copy of this message
Note Submitter: toxaz0 at gmail dot com ---- 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

« previous php.notes (#154420) next »