module UserTimeZones::Controller

Protected Instance Methods

user_time_zone(&block) click to toggle source

Use this time zone for the duration of this controller action

# File lib/user_time_zones/controller.rb, line 12
def user_time_zone(&block)
  Time.use_zone(current_user.time_zone, &block) unless current_user.time_zone.nil?
end