[FX.php List] Even stranger date math...
Bob Patin
bob at patin.com
Sun Sep 30 14:26:30 MDT 2007
I think you're right; I just looked, and DST ends on the 28th.
So I'm off by an hour then...
Sheesh... that'll cause problems twice each year. I'll have to write
code that looks for the change days and add or subtract an hour...
Thanks, I would never have found it; it was driving me completely
batty. I'm surprised though that PHP is DST-savvy to this extent.
BP
On Sep 30, 2007, at 3:22 PM, Troy Meyers wrote:
> Because of when daylight savings time ends?
>
> -Troy
>
>
>> OK, so I decided to use a WHILE loop, and the results are just as
>> strange:
>>
>> <?php
>>
>> $d1 = "10/28/2007";
>>
>> $thetime = strtotime($d1);
>>
>> $x = 2;
>>
>> while ($x < 43){
>>
>> $thetime = $thetime + 86400;
>>
>> $d[$x] = date('m/d/Y',$thetime);
>>
>> echo $d[$x]."<br>";
>>
>> $x++;
>>
>> }
>>
>> ?>
>>
>> Check it out... why does this not work right?
>>
>> _______________________________________________
>>
>> FX.php_List mailing list
>>
>> FX.php_List at mail.iviking.org
>>
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list