aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/time_with_zone.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/time_with_zone.rb')
-rw-r--r--activesupport/lib/active_support/time_with_zone.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb
index 984b1e43cb..82af1653ef 100644
--- a/activesupport/lib/active_support/time_with_zone.rb
+++ b/activesupport/lib/active_support/time_with_zone.rb
@@ -29,17 +29,12 @@ module ActiveSupport
@period ||= time_zone.period_for_utc(@utc)
end
- # Returns the simultaneous time in the specified zone
- def in_time_zone(new_zone)
+ # Returns the simultaneous time in Time.zone, or the specified zone
+ def in_time_zone(new_zone = ::Time.zone)
return self if time_zone == new_zone
utc.in_time_zone(new_zone)
end
- # Returns the simultaneous time in Time.zone
- def in_current_time_zone
- utc.in_current_time_zone
- end
-
# Returns a Time.local() instance of the simultaneous time in your system's ENV['TZ'] zone
def localtime
utc.getlocal