Skip to content

Instantly share code, notes, and snippets.

@divoxx
Created April 7, 2014 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save divoxx/10061747 to your computer and use it in GitHub Desktop.
Save divoxx/10061747 to your computer and use it in GitHub Desktop.
class ApplicationController < ActionController::Base
around_filter :set_timezone
def set_timezone
old, Time.zone = Time.zone, current_user.time_zone
yield
ensure
Time.zone = old
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment