Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ApplicationController < ActionController::Base
- before_filter :set_timezone
- protected
- def set_timezone
- tz_off = cookies[:timezone]
- Time.zone = ActiveSupport::TimeZone[tz_off.to_i] unless tz_off.nil?
- end
- end
Add Comment
Please, Sign In to add comment