Re: Is there a list of all Timezones as an array or someting?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Google Kreme wrote:

> On 20 Sep 2006, at 06:15 , Chris Boget wrote:
>
>>  $timeZonesArray = array( 'GMT'            => array( 'GMT'   =>  +0
>> // GMT
>
>
> Er... ok, but that seems to be missing quite a lot.  For example, I 
> notice that India Standard Time (IST; UTC +5:30) is missing from your 
> array.  Granted, it's only 1.1 Billion people and the largest English 
> speaking population in the world... (or second most, depending on 
> whom you ask).
>
> Or did you just forget to paste the Asia portion of the array?
>
Most Linux boxen have `|/usr/share/zoneinfo/zone.tab`, or grab it from
the database tables in a mysql server (assuming it is setup with
timezones imported) which would be the mysql.timezone* tables.

|http://www.php.net/putenv

The comments have quite a bit on timezones and PHP.  The command you
will use to change the timezone of the running script is:

putenv("TZ=$zone");

The equiv to set a MySQL connection to a certain timezone would be:

SET time_zone = '$zone';

http://dev.mysql.com/doc/refman/5.1/en/time-zone-support.html

That URL has the MySQL side of setting timezones.

Travis Doherty

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux