Re: date() is hours behind
| From: | PHP Webmaster | Date: | Wed, 01 Oct 2003 00:21:25 +0000 |
| Subject: | Re: date() is hours behind | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-164465@lists.php.net to get a copy of this message | ||
"Jon Kriek" <kriek@phpfreaks.com> wrote in message
news:20030930204730.45368.qmail@pb1.pair.com...
> putenv('TZ=Europe/London');
>
> OR
>
> putenv('TZ=GMT');
>
> --
> Jon Kriek
> http://phpfreaks.com
>
> "Php Webmaster" <phpwadmin@phpwebmaster.co.uk> wrote in message
> news:20030930085258.13084.qmail@pb1.pair.com...
> > I'm in London and and my timezone is GMT, so what should I use?
OK, using the putenv code you posted, I now have:
<?php
putenv('TZ=Europe/London');
echo date("l jS F Y, g:i A, T");
?>
Which displays:
Wednesday 1st October 2003, 1:19 AM, BST
The time and date is correct (thankgod!) but how comes the time zone is BST
(?) and not GMT?