aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/core_ext/time/zones.rb13
-rw-r--r--activesupport/lib/active_support/time_with_zone.rb5
2 files changed, 0 insertions, 18 deletions
diff --git a/activesupport/lib/active_support/core_ext/time/zones.rb b/activesupport/lib/active_support/core_ext/time/zones.rb
index 1fab89be48..5d8e085ef6 100644
--- a/activesupport/lib/active_support/core_ext/time/zones.rb
+++ b/activesupport/lib/active_support/core_ext/time/zones.rb
@@ -56,19 +56,6 @@ module ActiveSupport #:nodoc:
def in_current_time_zone
::Time.zone ? in_time_zone(::Time.zone) : self
end
-
- # Replaces the existing zone; leaves time values intact. Examples:
- #
- # t = Time.utc(2000) # => Sat Jan 01 00:00:00 UTC 2000
- # t.change_time_zone('Alaska') # => Sat, 01 Jan 2000 00:00:00 AKST -09:00
- # t.change_time_zone('Hawaii') # => Sat, 01 Jan 2000 00:00:00 HST -10:00
- #
- # Note the difference between this method and #in_time_zone: #in_time_zone does a calculation to determine
- # the simultaneous time in the supplied zone, whereas #change_time_zone does no calculation; it just
- # "dials in" a new time zone for +self+
- def change_time_zone(zone)
- ActiveSupport::TimeWithZone.new(nil, get_zone(zone), self)
- end
private
def get_zone(time_zone)
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb
index 0f5d0a2ee3..008c7f151b 100644
--- a/activesupport/lib/active_support/time_with_zone.rb
+++ b/activesupport/lib/active_support/time_with_zone.rb
@@ -41,11 +41,6 @@ module ActiveSupport
utc.in_current_time_zone
end
- # Changes the time zone without converting the time
- def change_time_zone(new_zone)
- time.change_time_zone(new_zone)
- end
-
# Returns a Time.local() instance of the simultaneous time in your system's ENV['TZ'] zone
def localtime
utc.getlocal