get timezone from location name in Ruby on Rails -
this question has answer here:
- ruby gem finding timezone of location 5 answers
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
Post a Comment