Re: change server time
| From: | Eddie Drapkin | Date: | Mon, 25 May 2009 03:41:34 +0000 |
| Subject: | Re: change server time | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-293102@lists.php.net to get a copy of this message | ||
If you want to change the server time ocmpletely and independent of PHP,
you're going to have to do it from the shell.
On Sun, May 24, 2009 at 11:36 PM, Sumit Sharma <sumitphp5@gmail.com> wrote:
> Yes, I works on windows as well well. Was looking for india time zone found
> it as putenv("TZ=Asia/Calcutta");. Thanks a lot, but this function does not
> change the server time permanently. Any Idea about any function which does
> so.
>
>
> Thanks,
> Sumit
>
>
>
> On Sun, May 24, 2009 at 12:33 PM, Michael A. Peters <mpeters@mac.com>
> wrote:
>
> > Sumit Sharma wrote:
> >
> >> Hi,
> >>
> >> Whenever I am using date('r') function It shows time in GMT instead of
> >> local time set on my machine. Do I need to configure the time
> separately.
> >> I
> >> am using WAMP server locally.
> >>
> >> Thanks,
> >> Sumit
> >>
> >>
> > Not sure about windows - but
> >
> > putenv("TZ=America/Los_Angeles");
> >
> > in your script should work (change the timezone to whatever you want
> > locally).
> >
> > You should be able to set the TZ variable globally in your php.ini file.
> >
>