Or try using strtotime("+1 day", previous_stamp);
On 18/02/2009, at 9:52 PM, Jochen Daum wrote:> Hi, > daylight saving. > > Instead of adding 60*60*24 seconds, getdate the date and add on day > with > mktime. This takes daylight saving into account. > > Note, if you iterate on 0:00 that should work, but be careful doing > stuff > between 2am and 3am as this is when most timezones seem to switch. > > HTH, Jochen > > On Wed, Feb 18, 2009 at 9:36 PM, Jai Ivarsson <[email protected]> > wrote: > >> >> Has anyone ever seen the date function not be perfect each time? >> >> I am creating a calendar, that should if there something happening on >> any given day in the month. I have a timestamp that I am iterating. >> At >> the end of each iteration I add (60*60*24) to the timestamp, the >> result should move the timestamp forward a day. It is working perfect >> most of the time but for some reason by the time it gets to the end >> of >> the month, there seems be be a rounding issue so it is either moving >> forward 25 hours or 23 hours. I can handle the 25 as it is still >> moving to the next day, but 23 it resulting in having two 25th's of >> Oct for instance. >> >> I am making sure that my timestamp is set as 0 hours, minutes and >> seconds, and setting it to the first day of the month, but by the end >> of most months if it out of wack, normal forward an hour. >> >> Any help would be much appreciated. >> >> Thanks, >> Jai >> >>> >> > > > --- Simon Welsh Admin of http://simon.geek.nz/ Who said Microsoft never created a bug-free program? The blue screen never, ever crashes! http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e --~--~---------~--~----~------------~-------~--~----~ NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected] -~----------~----~----~----~------~----~------~--~---
