Pretty funny…
If you have a loop that starts on day x and ends on day y, and you’re incrementing by 24 hours (86400 seconds), you’ll find that you’ll get 11/01/2009 twice! The day has 25 hours (Daylight Savings).
My quick solution was to add 3 hours to the timestamp on day x. Then looping through, I still get exactly the same whole days, but +/- 1 hour as the clocks change won’t affect the output.
-Bryan
--
about me: http://www.bryancockerham.com
Relax. Don't be so hard on yourself. You don't have to be perfect...
...you just have to be better than everyone else.
LOL, none of my code runs for days :)
I meant something like:
for(date=two_months_back; date < today; date+=86400){
print “today is: “.date(“m-d-Y”, date);
}
You’ll get 11-01-2009 twice.