hi miguel

i'm testing on a windows so not sure where the
timezone info would be but what you are saying
that if i port my app to a unix box then it would
be easy to just add the missing timezones in
/usr/share/zoneinfo, right?  if that's the case
then i could just test with pacific, eastern and
mountain time for now.

also, do you know if i store all my dates as GMT
then when i convert to different timezones using
putenv, will this take into account the daylight
savings?



-----Original Message-----
From: Miguel Cruz [mailto:[EMAIL PROTECTED]]
Sent: May 20, 2002 1:27 PM
To: SP
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] timezone problem


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
>
>
>


---
Incoming 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

---
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


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

Reply via email to