OK, I think one of us is insane - it's either me or Unix.
<?php
$date = "2004-10-28";
$stdate = strtotime($date);
for ($i=1; $i<9; $i++)
{
$date2 = date("Y-m-d", $stdate);
echo '<br>'.$stdate.' / '.$date2;
$stdate = $stdate+60*60*24;
}
?>
This is a small test script that runs through the days, converts them to Unix timestamp, and then back to formatted date. Nothing fancy, pretty self-explanatory. The problem is that it appears that this year October 31st will happen twice.
Here is the results I get:
2004-10-28 / 1098936000 / 2004-10-28
2004-10-29 / 1099022400 / 2004-10-29
2004-10-30 / 1099108800 / 2004-10-30
2004-10-31 / 1099195200 / 2004-10-31
2004-10-31 / 1099281600 / 2004-10-31
2004-11-01 / 1099368000 / 2004-11-01
2004-11-02 / 1099454400 / 2004-11-02
I found the issue while making a script that schedules weekly recurring events - all events that start in October (like every Friday) would suddenly move one day back in November. It doesn't happen with any other month / day / year combinations (I tested at least 20)... Please tell me it's just something really simple that I am not seeing, or that it's just my server.
Thanks!