[TriLUG] OT?: php anomaly

stan briggs stan at StanBriggs.com
Wed Aug 16 15:43:18 EDT 2006


all,

can anyone help me understand why it is that on or about 10-29 of each year
i can't get php to increment the unix date? here is the php code that i'm
using:
<?
$CurrentDate = "2006-10-24";
$EndDate = "2006-11-15";
while ( $CurrentDate <= $EndDate ) {
	$CurrentUnixDate = strtotime($CurrentDate); 
	$ShortDate = date("m-d",$CurrentUnixDate);
	echo "$ShortDate($CurrentUnixDate)[$CurrentDate]\n";
	$CurrentUnixDate = $CurrentUnixDate + 86400 ;
	$CurrentDate = date("Y-m-d",$CurrentUnixDate);
}
?>

this code stops incrementing on 10/29. note that if you change the year to
last year or to next year you get the same behavior on a slightly different
date.

someone impress me,
stan

Stan B. Briggs
+1-919-461-1096 




More information about the TriLUG mailing list