diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-03-12 05:54:26 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-03-12 05:54:26 +0000 |
commit | 93db1989fe1146ea79e3b0b2252542408ff86443 (patch) | |
tree | 027a188795856cc28bcf15d2886ddad96cc3bb10 /activesupport | |
parent | bedb879913903e7b2548db7d67a57111b30fa267 (diff) | |
download | rails-93db1989fe1146ea79e3b0b2252542408ff86443.tar.gz rails-93db1989fe1146ea79e3b0b2252542408ff86443.tar.bz2 rails-93db1989fe1146ea79e3b0b2252542408ff86443.zip |
Fix to_datetime test broken by DST change. Closes #7797.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6389 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/core_ext/time_ext_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/test/core_ext/time_ext_test.rb b/activesupport/test/core_ext/time_ext_test.rb index 8616129348..5b7cb1fde7 100644 --- a/activesupport/test/core_ext/time_ext_test.rb +++ b/activesupport/test/core_ext/time_ext_test.rb @@ -356,10 +356,10 @@ class TimeExtCalculationsTest < Test::Unit::TestCase def test_to_datetime assert_equal Time.utc(2005, 2, 21, 17, 44, 30).to_datetime, DateTime.civil(2005, 2, 21, 17, 44, 30, 0, 0) with_timezone 'US/Eastern' do - assert_equal Time.local(2005, 2, 21, 17, 44, 30).to_datetime, DateTime.civil(2005, 2, 21, 17, 44, 30, DateTime.now.offset, 0) + assert_equal Time.local(2005, 2, 21, 17, 44, 30).to_datetime, DateTime.civil(2005, 2, 21, 17, 44, 30, Rational(Time.local(2005, 2, 21, 17, 44, 30).utc_offset, 86400), 0) end with_timezone 'NZ' do - assert_equal Time.local(2005, 2, 21, 17, 44, 30).to_datetime, DateTime.civil(2005, 2, 21, 17, 44, 30, DateTime.now.offset, 0) + assert_equal Time.local(2005, 2, 21, 17, 44, 30).to_datetime, DateTime.civil(2005, 2, 21, 17, 44, 30, Rational(Time.local(2005, 2, 21, 17, 44, 30).utc_offset, 86400), 0) end end |