diff --git a/app/controllers/admin/events_controller.rb b/app/controllers/admin/events_controller.rb index 1d9c4e79..12073146 100644 --- a/app/controllers/admin/events_controller.rb +++ b/app/controllers/admin/events_controller.rb @@ -7,14 +7,6 @@ module Admin before_action :get_event, except: [:index, :create, :reports] - # FIXME: The timezome should only be applied on output, otherwise - # you get lost in timezone conversions... - # around_filter :set_timezone_for_this_request - - def set_timezone_for_this_request(&block) - Time.use_zone(@conference.timezone, &block) - end - def index @events = @program.events @tracks = @program.tracks diff --git a/app/controllers/schedules_controller.rb b/app/controllers/schedules_controller.rb index 0b135328..c959e2f2 100644 --- a/app/controllers/schedules_controller.rb +++ b/app/controllers/schedules_controller.rb @@ -3,6 +3,14 @@ class SchedulesController < ApplicationController before_action :respond_to_options load_and_authorize_resource :conference, find_by: :short_title load_resource :program, through: :conference, singleton: true, except: :index + around_action :use_timezone_for_this_request + + # FIXME: The timezome should only be applied on output, otherwise + # you get lost in timezone conversions... + + def use_timezone_for_this_request(&block) + Time.use_zone(@conference.timezone, &block) + end def show @rooms = @conference.venue.rooms if @conference.venue