Re: php's 27/10/2002 problem Important
| From: | Bas Jobsen | Date: | Mon, 16 Sep 2002 13:09:49 +0000 |
| Subject: | Re: php's 27/10/2002 problem Important | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-116520@lists.php.net to get a copy of this message | ||
I don't see any problem.
Maybe you read out, your data in a wrong way.
Watch out: 1.035.666.000 + (24*60*60) = 1.035.7524.000
Op maandag 16 september 2002 15:32, schreef Mahmut Kursun:
> 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 " 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>";
> }
> ?>