Re: timezone problem
| From: | Miguel Cruz | Date: | Mon, 20 May 2002 17:26:47 +0000 |
| Subject: | Re: timezone problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-98478@lists.php.net to get a copy of this message | ||
I think these are system-specific. You'll probably have to check which
time zone your machine understands. For instance, on this FreeBSD machine
there are hundreds of them in /usr/share/zoneinfo but on other machines
there are only a handful.
In short, I believe it's an OS rather than a PHP thing.
miguel
On Mon, 20 May 2002, SP wrote:
> I am trying to convert date/times to different
> timezones using putenv but I am having problems
> using the right TZ names. I am trying the zones I
> found here
> http://fuck.org/~ryan/squirrel/timezone/timezones.
> php but it seems the only ones that work are
> EST5EDT, CST6CDT, MST7MDT, PST8PDT and GMT.
>
> OUTPUT
> =======
>
> May 20 2002 10:46 am Eastern Standard Time
> May 20 2002 3:46 pm Ame
> May 20 2002 3:46 pm Ame
> May 20 2002 10:46 am EST
> May 20 2002 2:46 pm GMT
> May 20 2002 3:46 pm Eur
> May 20 2002 3:46 pm Asi
>
> CODE
> =====
>
> echo date("F j Y g:i a T"), "<br>";
>
> putenv("TZ=America/Los_Angeles");
> echo date("F j Y g:i a T"), "<br>";
>
> putenv("TZ=America/New_York");
> echo date("F j Y g:i a T"), "<br>";
>
> putenv("TZ=EST5EDT");
> echo date("F j Y g:i a T"), "<br>";
>
> putenv("TZ=GMT");
> echo date("F j Y g:i a T"), "<br>";
>
> putenv("TZ=Europe/Paris");
> echo date("F j Y g:i a T"), "<br>";
>
> putenv("TZ=Asia/Hong_Kong");
> echo date("F j Y g:i a T"), "<br>";
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system
> (http://www.grisoft.com).
> Version: 6.0.361 / Virus Database: 199 - Release
> Date: 07/05/02
>
>
>