Skip to content

List of timezones as a drop menu

May 10, 2009

If you want to support users in multiple timezones to display time sensitive data like we do in our server monitoring application, Server Density, then you need to be able to display a list of all the available timezones.

This can be difficult if you’re not simply doing a list of GMT+1, GMT+2, etc. If you do this then the user needs to change it when daylight savings time comes into effect and it’s not very user friendly for users who are unsure of their current timezone.

The route we took was to display a list of major cities on a per continent basis so the user can select the city nearest them and get the right date and time every time.

The code you need can be found here:

This can be used with the tutorial I wrote up about handling timezone conversion with PHP.

3 Comments leave one →
  1. May 25, 2009 12:53 pm

    I think a better approach would be to come up with a list of user friendly names (similar to the windows designations for timezones), and map those to Olson TZIDs. I wrote about a how I did this on my blog if you want to check it out: http://www.aviblock.com/blog/2009/03/12/presenting-a-list-of-timezones-to-the-user/

    I also found a similarly laid out list on this site once too: http://vyew.com

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 902 other followers