Guest User

Untitled

a guest
Apr 26th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. class ApplicationController < ActionController::Base
  2. before_filter :set_timezone
  3. protected
  4. def set_timezone
  5. tz_off = cookies[:timezone]
  6. Time.zone = ActiveSupport::TimeZone[tz_off.to_i] unless tz_off.nil?
  7. end
  8. end
Add Comment
Please, Sign In to add comment