diff --git a/activesupport/lib/active_support/core_ext/time/zones.rb b/activesupport/lib/active_support/core_ext/time/zones.rb index e48866abe3dc6..1e43c1ef7a968 100644 --- a/activesupport/lib/active_support/core_ext/time/zones.rb +++ b/activesupport/lib/active_support/core_ext/time/zones.rb @@ -27,11 +27,11 @@ def zone # around_filter :set_time_zone # # def set_time_zone - # old_time_zone = Time.zone - # Time.zone = current_user.time_zone if logged_in? - # yield - # ensure - # Time.zone = old_time_zone + # if logged_in? + # Time.use_zone(current_user.time_zone) { yield } + # else + # yield + # end # end # end def zone=(time_zone)