Rails Engine which sets the Rails timezone to the browser's configured timezone for each request.
Add it to your Gemfile.
Make sure you have each of the following entries in your application.js:
//= require js.cookie //= require jstz //= require browser_timezone_rails/set_time_zone
That's it! No other configuration is needed as it's all done for you with this gem including setting up your application controller to start using your users' zones.
How it works
You can also read more about this implementation here: Blog
For those of you who need or want to do this on the backend with just Rails, Ryan Bates has a good RailsCast on how to that: RailsCast #106
About that cookie
The cookie is set each full page request and lives for 365 days
Yes. It uses the Rails Time.zone method which is thread safe.
To run the tests, invoke
bundle exec rspec.