I'm interested in getting the timezone of my users. I already have their city, state, zip, lat & lng and I would like to get their timezone. I've one service that does this conversion ( http://api.geonames.org/timezone?lat=47.01&lng=10.2&username=demo) , however i was wondering if there was a better solution, or if someone has wrapped up this functionality into a decent gem.
            Asked
            
        
        
            Active
            
        
            Viewed 1,747 times
        
    2 Answers
4
            See this:
http://rubygems.org/gems/timezone
Should be a matter of:
gem install timezone
And then reading through the documentation to hook up your app to it.
Good luck!
        DemitryT
        
- 391
 - 4
 - 17
 
- 
                    As a follow up, nowadays the approach is add this gem to your Gemfile (gem 'timezone') and run "bundle install". Enjoy! – DemitryT Feb 25 '13 at 18:53
 
1
            
            
        There is a gem which use google timezone service
https://github.com/sck-v/google_timezone
result = GoogleTimezone.fetch(50.1196004, 8.679918299999999)
result.time_zone_id # gives you 'Europe/Berlin'
        user2396093
        
- 11
 - 1