putenv usage

putenv usage

am 22.07.2009 16:08:42 von Manoj Singh

--0016361e7cc696b57a046f4be861
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hi All,

I have a page where the user specifies in which timezone they belong to and
based on that i have to show the date & time. So I have to set the different
timezones. For this I am using putenv function like:
putenv("TZ=US/Eastern");

Now my question is whether it is fine to use putenv in the production
environment? Whether the putenv changes the timezone value globally for all
request or for the current request only?

Please advise.

Regards,
Manoj

--0016361e7cc696b57a046f4be861--

Re: putenv usage

am 22.07.2009 16:16:25 von David Otton

2009/7/22 Manoj Singh :

> Now my question is whether it is fine to use putenv in the production
> environment? Whether the putenv changes the timezone value globally for all
> request or for the current request only?

"The environment variable will only exist for the duration of the
current request." - www.php.net/putenv

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: putenv usage

am 22.07.2009 23:00:20 von jenai tomaka

--_161d466e-66b3-485e-a9d8-b9bef478f755_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


You can use the date_default_timezone_set()=2C it will set the default time=
zone to your timezone choose=2C some server denied the access to the enviro=
nment variable

Yuri Yarlei.
Programmer PHP=2C CSS=2C Java=2C PostregreSQL=3B
Today PHP=2C tomorrow Java=2C after the world.
Kyou wa PHP=2C ashita wa Java=2C sono ato sekai desu.



> Date: Wed=2C 22 Jul 2009 15:16:25 +0100
> From: phpmail@jawbone.freeserve.co.uk
> To: manojsingh2121@gmail.com
> CC: php-general@lists.php.net
> Subject: Re: [PHP] putenv usage
>=20
> 2009/7/22 Manoj Singh :
>=20
> > Now my question is whether it is fine to use putenv in the production
> > environment? Whether the putenv changes the timezone value globally for=
all
> > request or for the current request only?
>=20
> "The environment variable will only exist for the duration of the
> current request." - www.php.net/putenv
>=20
> --=20
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe=2C visit: http://www.php.net/unsub.php
>=20

____________________________________________________________ _____
Compartilhe os momentos mais importantes da sua vida.
http://www.microsoft.com/brasil/windows/windowslive/products /photos-share.a=
spx?tab=3D1=

--_161d466e-66b3-485e-a9d8-b9bef478f755_--