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

From: Date: Thu, 21 Sep 2006 02:59:54 +0000
Subject: Re: Is there a list of all Timezones as an array or someting?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-242008@lists.php.net to get a copy of this message
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

« previous php.general (#242008) next »