get timezone from location name in Ruby on Rails -


this question has answer here:

as can timezone country code like

c = tzinfo::country.get('us') zones = c.zone_identifiers 

this returns zones of country.

but need specific zone of location i.e. "washington, usa"
there way timezone location name?

so can timezone giving location name("washington, usa")

you download geonames db , compare lat/lng nearest place (with timezone) in db

  • download database of cities geonames.org
  • convert compact lat/lon -> timezone list

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -