Following Ryan Bates’ instructions on creating a before_filter that sets a time_zone like so :
before_filter :set_timezone
def set_timezone
Time.zone = @current_user.time_zone
end
Why does this not affect, let’s say, another user using the same application at the same time in different timezone?
Because even Rails app can have many threads, each thread maintains its own
zone. So, from the time you clicked a link and till you got the response body you were exclusively dealing with the same thread (i.e. with the samezone).