Time zone by country

Time Zone by Country.png Google Analytics is the first web app I’ve seen that does time zone by country.



It’s easier to navigate than a long list of time zones. And it lets you use the keyboard more easily, because you can type the first letter of your country name to select. In a select box where all entries start with “(GMT …”, the keyboard isn’t much help.

4 comments

Thomas
 

we've been doing something similar with 23, http://23hq.com for some. automatically setting the timezone based on country selection and if there are several time zones in the country display those possibilities.
Read more
Read less
  Cancel
Lars Pind
 

Neat, I hadn't noticed because I'm in a country with just one time zone.
Read more
Read less
  Cancel
Mark Aufflick
 

Google analytics does the same - offers a dropdown for the timezone when your country (like mine) has more than one. They even get Central time right (it's on a half hour boundary which is very unusual). At last, US companies start to get timezones! I wonder if it handles daylight savings properly (did you know some locations have more than 1 hour daylight savings?).
Read more
Read less
  Cancel
Steffen
 

I'm happy that Thomas did put the record straight, but I though I might contribute some details about the way we do timezones. First, we stole some data from somewhere. Sadly, I can't remember the source. Then we search-replace'd it to a decent javascript data set: http://www.23hq.com/resources/um-style/timezones.js After including this, it's simple a matter of letting the user choose his country a then rebuild another <select> box with the applicable timezones: $('country').onchange = function() { var country = this[this.selectedIndex].value; var tzObj = this.parentNode.timezone; // Clear children while (tzObj.lastChild) tzObj.removeChild(tzObj.lastChild) if (tz[country]) { foreach (i in tz[country]) { var option = document.createElement('option'); option.value = tz[country][i]; option.appendChild(document.createTextNode(tz[country][i])); tzObj.appendChild(option); } } } (I haven't tested the code, but look at the slightly more complicated source at http://www.23hq.com/23/signup if it doesn't do the job correctly...) Also, Thomas wanted me to include a usability tip: If there's only one applicable timezone for the user's country (which is very often the case, of course) there's no need to actually show the timezeone select box.
Read more
Read less
  Cancel

Leave a comment