If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Autofill time zone if you've set your geographic location



Participation Infrastructure
3 years ago
3 years ago


(Reporter: athulsuresh, Unassigned)


(Blocks: 1 bug)


(Whiteboard: [Triage 2015-04-17])



3 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36

Steps to reproduce:

Register / edit the profile

Actual results:

timezone doesnt have country name. currently its like "asia/cityname" or "africa/cityname" etc

Expected results:

change the current style to continent/country/region 
Would be great to see Auto-selection of timezone according to Selected Region/country during profile creation!
There's a few web services that do this:

There's also "the tz database" which ruby developers rely on: http://www.twinsun.com/tz/tz-link.htm
relevant ruby gem: https://github.com/panthomakos/timezone

I haven't found anything from Mapbox (yet).

Comment 2

3 years ago
Why can't we logically select the timezone using the country and region a user type those respective fields above? Most of mozillians will type their correct location in the city and country fields. We could automatically select the timezone from those fields by predicting right?

the ruby project you mentioned uses geonames api which also have user limits. (That's what I see there).

I guess its better to have a in-house timezone fetching system for mozilla. Just my opinions!
I agree that autosetting time zone would be handy. Knowing the country and region doesn't tell you what time zone you're in. You need a database to associate those things. We're already calling out to the mapbox API for locations, doing a second API for timezone autosetting is no big deal.

I think it should be done in JS, which leaves you the ability to modify the autofill before submission if you wish. No need for any back-end changes here.
Ever confirmed: true
Summary: Timezone sorting should have country too + autoselection → Autofill time zone if you've set your geographic location
There's an awful lot of data here. https://github.com/panthomakos/timezone/tree/master/data

5.8Mb uncompressed, 913kb compressed (probably because the formatting repeats itself so much!)
Version: 2014-06.6 → other
Blocks: 1154617
Whiteboard: [Triage 2015-04-17]
You need to log in before you can comment on or make changes to this bug.