aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/date_time_ext_test.rb
diff options
context:
space:
mode:
authorbrainopia <brainopia@evilmartians.com>2012-01-25 00:07:58 +0400
committerbrainopia <brainopia@evilmartians.com>2012-01-25 23:04:40 +0400
commitb258bec4317d1013ad4ce2659fa46c4b0bb43c96 (patch)
tree8d189bf4c6d1b3223d4cf82d35cbdb8427600fe8 /activesupport/test/core_ext/date_time_ext_test.rb
parent203771da9e0b0357f23e1c4e61d2e72578af4155 (diff)
downloadrails-b258bec4317d1013ad4ce2659fa46c4b0bb43c96.tar.gz
rails-b258bec4317d1013ad4ce2659fa46c4b0bb43c96.tar.bz2
rails-b258bec4317d1013ad4ce2659fa46c4b0bb43c96.zip
Deprecate DateTime.local_offset
Diffstat (limited to 'activesupport/test/core_ext/date_time_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/date_time_ext_test.rb13
1 files changed, 2 insertions, 11 deletions
diff --git a/activesupport/test/core_ext/date_time_ext_test.rb b/activesupport/test/core_ext/date_time_ext_test.rb
index 433dafde83..57b5b95a66 100644
--- a/activesupport/test/core_ext/date_time_ext_test.rb
+++ b/activesupport/test/core_ext/date_time_ext_test.rb
@@ -43,8 +43,8 @@ class DateTimeExtCalculationsTest < ActiveSupport::TestCase
end
def test_civil_from_format
- assert_equal DateTime.civil(2010, 5, 4, 0, 0, 0, DateTime.local_offset), DateTime.civil_from_format(:local, 2010, 5, 4)
- assert_equal DateTime.civil(2010, 5, 4, 0, 0, 0, 0), DateTime.civil_from_format(:utc, 2010, 5, 4)
+ assert_equal Time.local(2010, 5, 4, 0, 0, 0), DateTime.civil_from_format(:local, 2010, 5, 4)
+ assert_equal Time.utc(2010, 5, 4, 0, 0, 0), DateTime.civil_from_format(:utc, 2010, 5, 4)
end
def test_seconds_since_midnight
@@ -331,15 +331,6 @@ class DateTimeExtCalculationsTest < ActiveSupport::TestCase
assert DateTime.new.acts_like_time?
end
- def test_local_offset
- with_env_tz 'US/Eastern' do
- assert_equal Rational(-5, 24), DateTime.local_offset
- end
- with_env_tz 'US/Central' do
- assert_equal Rational(-6, 24), DateTime.local_offset
- end
- end
-
def test_utc?
assert_equal true, DateTime.civil(2005, 2, 21, 10, 11, 12).utc?
assert_equal true, DateTime.civil(2005, 2, 21, 10, 11, 12, 0).utc?