|
Posted by Captain Paralytic on 01/29/07 12:09
On 29 Jan, 07:28, Heiko Richler <heiko-rich...@nefkom.net> wrote:
> Carl Vondrick wrote:
> > $oneday = 86400;Watch out for daylight-saving time. There may be Days longer or shorter
> than 24h! Never start at Midnight.
>
> Or use mktime. mktime(0,0,0,2,0,2007) is Jan. 31. 2007 and
> mktime(0,0,0,1,32,2007) is Feb. 1.
>
> Heiko
> --http://portal.richler.de/Namensportal zu Richlerhttp://www.richler.de/ Heiko Richler: Computer - Know How!http://www.richler.info/ private Homepage
Yes, DST is a real gotcha. I had a similar problem which was discussed
in this forum a while ago.
I was advised to use strtotime. My query was regarding adding numbers
of weeks. In your case you'd use something like:
$adate = strtotime("+1 day", strtotime($adate));
[Back to original message]
|