Re: Time Zone names

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

 



On 7/13/05, Richard Lynch <ceo@xxxxxxxxx> wrote:
> I'd like to generate a list of time zones (EST, CDT, whatever) for a popup.
> 
> Seems like it should be easy...
> 
> This is so the Sales guy can just plug in the time and zone of who he's
> gotta call back, and I stuff that in the database, and he gets a morning
> report of who to call.
> 
> <?php
>   for ($offset = 0; $offset <= 23; $offset++){
>     $z = ???;
>     echo "<option>$z</option>\n";
>   }
> ?>
> 
> What can I use for ??? to get the time zone name for offsets?
> 
> The date() function tells me what time zone the webserver is in, which is
> not even *HIS* time zone, much less the client's.
> 
> The idate() function is not available.
> 
> I can't just shove $offset into putenv("TZ=$offset") -- Apparently, in
> order to set TZ I would need to know, a priori, the name of the time zone,
> so that's not real helpful for what I need.
> 
> I looked at all the User Contributed notes, and none seemed to answer it.
> 
> I suppose I could Google for "PHP time zone" but...
> 
> What am I missing?
> 
> --
> Like Music?
> http://l-i-e.com/artists.htm
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

Richard,
Take a look at wikipedia's timezone page. You could probably parse the
table and get what you want. And it's GPL.
http://en.wikipedia.org/wiki/Time_zone

Dotan
http://lyricslist.com/lyrics/artist_albums/299/krauss_alison.php
Krauss, Alison Song Lyrics

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