Re: Problem with strtotime() and 2002-03-31
| From: | Miguel Cruz | Date: | Wed, 20 Mar 2002 01:02:28 +0000 |
| Subject: | Re: Problem with strtotime() and 2002-03-31 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-89246@lists.php.net to get a copy of this message | ||
On Wed, 20 Mar 2002, John Clarke wrote:
> I have used the following script successfully for a year now, but have just
> found a problem with the date 2002-03-31.
> When I add 0 days to this date it returns 2002-03-31. Correct!
> When I add 1 day to this date it still returns 2002-03-31. NOT Correct
> n I add 2 days to this date it returns 2002-03-31. NOT
> correct
>
> So far this is the only date that I havefound a problem with.
>
> Any ideas why this would be happening?
This is a very wild guess, but is it possible that in your locale that's
a daylight savings time transition, resulting in a 25-hour day, so that
adding 24 hours to midnight doesn't bring you into the next day?
Try explicitly setting the time to noon and then working from there.
miguel