aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/time_with_zone.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb
index 517b2bac7f..13f968386a 100644
--- a/activesupport/lib/active_support/time_with_zone.rb
+++ b/activesupport/lib/active_support/time_with_zone.rb
@@ -29,6 +29,7 @@ module ActiveSupport
# Returns the simultaneous time in the specified zone
def in_time_zone(new_zone)
+ return self if time_zone == new_zone
utc.in_time_zone(new_zone)
end