Re: Re[4]: [PHP] 28th of March - PHP Problems!
| From: | Shaun | Date: | Fri, 05 Mar 2004 19:48:43 +0000 |
| Subject: | Re: Re[4]: [PHP] 28th of March - PHP Problems! | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-179594@lists.php.net to get a copy of this message | ||
"Richard Davey" <rich@launchcode.co.uk> wrote in message
news:854743823.20040305125210@launchcode.co.uk...
> Hello Jason,
>
> Friday, March 5, 2004, 12:27:46 PM, you wrote:
>
> JW> I get the correct output (ie Sun Mar 28 2004). But quoting your
previous post,
> JW> how did you get: "Sat Mar 27 2004 for me, which is exactly what it
should"?
>
> Because I over-looked that part :) but more importantly, upon
> reflection, it has still done what I would have expected because it's
> a BST date and PHP hasn't been told about it, so it's left to its own
> devices.
>
> "If it's unknown, PHP tries to figure it out itself. This can cause
> unexpected (but not incorrect) results."
>
> echo date("D M d Y", gmmktime(0, 0, 0, 3, 28, 2004, 1));
>
> Will give me Sun Mar 28 2004, because its a GMT date falling into BST.
>
> --
> Best regards,
> Richard Davey
> http://www.phpcommunity.org/wiki/296.html
Thanks for your replies,
Heres some interesting info:
http://bugs.php.net/bug.php?id=26111