Time Zone names

From: Date: Wed, 13 Jul 2005 16:47:20 +0000
Subject: Time Zone names
Groups: php.general 
Request: Send a blank email to php-general+get-218625@lists.php.net to get a copy of this message
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

« previous php.general (#218625) next »