php's 27/10/2002 problem Important

From: Date: Mon, 16 Sep 2002 13:32:42 +0000
Subject: php's 27/10/2002 problem Important
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-116514@lists.php.net to get a copy of this message
If you are trying to code a sequantial date requiring algorithm you will see that for 27/10/2002 you have two timestamps!!!! And that is a serious bug I think. Any comments! timestamp : formatted date (d/m/Y) 1035666000 : 27/10/2002 1035752400 : 27/10/2002 P.S. To be able to generate the same output have the following code snippet: <? $timestamp = mktime (0,0,0,10,25,2002); echo "start date is"; echo $timestamp . " : " . strftime('%d/%m/%Y', $timestamp ) . "<br>"; echo "<br>"; echo "&nbsp;&nbsp;timestamp : formatted date"; echo "<br>"; for ($x=1; $x<10; $x++){ $timestamp = $timestamp + 24*60*60; echo $timestamp . " : " . strftime('%d/%m/%Y', $timestamp ) . "<br>"; echo $timestamp . " : " . date('d/m/Y', $timestamp ) . "<br>"; echo "<br>"; } ?>

« previous php.general (#116514) next »