Skip to content

Instantly share code, notes, and snippets.

@divoxx
Created April 7, 2014 21:32
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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