aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/time
diff options
context:
space:
mode:
authorGeoff Buesing <gbuesing@gmail.com>2008-03-11 06:23:41 +0000
committerGeoff Buesing <gbuesing@gmail.com>2008-03-11 06:23:41 +0000
commit3af5b278397c8162b2ac29bd8eeac1239e4fea15 (patch)
tree901c6977bf653302977f3bf55d1b68f4232921fb /activesupport/lib/active_support/core_ext/time
parentba91fddc442ecfbeffb3c7b05fa5851fabc32059 (diff)
downloadrails-3af5b278397c8162b2ac29bd8eeac1239e4fea15.tar.gz
rails-3af5b278397c8162b2ac29bd8eeac1239e4fea15.tar.bz2
rails-3af5b278397c8162b2ac29bd8eeac1239e4fea15.zip
Removing unneeded #change_time_zone method from Time, DateTime and TimeWithZone
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9008 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/core_ext/time')
-rw-r--r--activesupport/lib/active_support/core_ext/time/zones.rb13
1 files changed, 0 insertions, 13 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)