Re: PHP 4.0 Bug #5036: strtotime always returns one day early.
| From: | php4 at developersdesk dot com | Date: | Wed, 14 Jun 2000 14:54:26 +0000 |
| Subject: | Re: PHP 4.0 Bug #5036: strtotime always returns one day early. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-21340@lists.php.net to get a copy of this message | ||
Addressed to: brw@brw.net
php-dev@lists.php.net
** Reply to note from brw@brw.net 14 Jun 2000 19:21:24 -0000
>
> From: brw@brw.net Operating system: Linux (RedHat 6.2) PHP version:
> 4.0.0 Release PHP Bug Type: Scripting Engine problem Bug description:
> strtotime always returns one day early.
>
> strtotime always returns one day early.
>
> echo date("F j, Y", strtotime("10 march 2000")); echo date("F j,
> Y",
> strtotime("10 february 1999"));
>
> DISPLAYS
>
> March 9, 2000 February 9, 1999
>
Always, or just during certain hours of the day. My guess is that
strtotime() makes a Universal Time value, then you pass it to date()
which adjusts the time for your time zone.
You might want to use gmdate() instead.
Rick Widmer