Skip to content

Instantly share code, notes, and snippets.

@divoxx
Created April 7, 2014 21:32
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