Re: date() is hours behind
| From: | PHP Webmaster | Date: | Tue, 30 Sep 2003 08:53:48 +0000 |
| Subject: | Re: date() is hours behind | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-164352@lists.php.net to get a copy of this message | ||
"Jon Kriek" <kriek@phpfreaks.com> wrote in message
news:20030930010342.10158.qmail@pb1.pair.com...
> Well I meant just
>
> putenv('TZ=US/Eastern');
>
> But you get the idea.
>
> --
> Jon Kriek
> http://phpfreaks.com
>
> "Jon Kriek" <kriek@phpfreaks.com> wrote in message
> news:20030930010110.5151.qmail@pb1.pair.com...
> > See the putenv() function. For example to get the correct Eastern
Standard
> > Time
> >
> > http://www.php.net/putenv
> >
> > <?php
> > putenv('TZ=US/Eastern');
> > echo 'Last modified: ' . date('d/m/y H:i', getlastmod());
> > ?>
> >
> > --
> > Jon Kriek
> > http://phpfreaks.com
> >
> > "Php Webmaster" <phpwadmin@phpwebmaster.co.uk> wrote in message
> > news:20030929232143.99386.qmail@pb1.pair.com...
> > > Hi all,
> > >
> > > I currently use:
> > >
> > > date("l jS F Y, g:i A");
> > >
> > > To format the current date/time to my personal preference.
> > >
> > > However, at 12:19 AM on my machine, date("l jS F Y, g:i A"); shows
> > 4:19PM...
> > > 8 hours slow :(
> > >
> > > Any ideas on how to correct this? Am I right in saying that there is a
> > > timezone problem?
> > >
> > > Any ideas appreciated.
I'm in London and and my timezone is GMT, so what should I use?