Re: date() is hours behind
| From: | Curt Zirzow | Date: | Wed, 01 Oct 2003 00:42:23 +0000 |
| Subject: | Re: date() is hours behind | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-164466@lists.php.net to get a copy of this message | ||
* Thus wrote PHP Webmaster (phpwadmin@phpwebmaster.co.uk):
>
> "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?
Because BST != GMT, and BST == Europe/London. The major difference
between the two is that GMT is fixed, no adjustments for
summer/winter times. When fall (clocks turn back) comes around I
believe the BST turns into GMT.
Curt
--
"I used to think I was indecisive, but now I'm not so sure."