Skip to content
Browse files

test_time_with_datetime_fallback expects DateTime.local_offset instea…

…d of DateTime.now.offset

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9002 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent cff3ecc commit f56c25d7b44d4ac4936a39bbcad53614daea162a @gbuesing gbuesing committed Mar 10, 2008
Showing with 4 additions and 2 deletions.
  1. +2 −0 activesupport/CHANGELOG
  2. +2 −2 activesupport/test/core_ext/time_ext_test.rb
View
2 activesupport/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* test_time_with_datetime_fallback expects DateTime.local_offset instead of DateTime.now.offset [Geoff Buesing]
+
* Adding TimeWithZone #marshal_dump and #marshal_load [Geoff Buesing]
* Add OrderedHash#to_hash [josh]
View
4 activesupport/test/core_ext/time_ext_test.rb
@@ -419,9 +419,9 @@ def test_time_with_datetime_fallback
assert_equal Time.time_with_datetime_fallback(:utc, 2005, 2, 21, 17, 44, 30), Time.utc(2005, 2, 21, 17, 44, 30)
assert_equal Time.time_with_datetime_fallback(:local, 2005, 2, 21, 17, 44, 30), Time.local(2005, 2, 21, 17, 44, 30)
assert_equal Time.time_with_datetime_fallback(:utc, 2039, 2, 21, 17, 44, 30), DateTime.civil(2039, 2, 21, 17, 44, 30, 0, 0)
- assert_equal Time.time_with_datetime_fallback(:local, 2039, 2, 21, 17, 44, 30), DateTime.civil(2039, 2, 21, 17, 44, 30, DateTime.now.offset, 0)
+ assert_equal Time.time_with_datetime_fallback(:local, 2039, 2, 21, 17, 44, 30), DateTime.civil(2039, 2, 21, 17, 44, 30, DateTime.local_offset, 0)
assert_equal Time.time_with_datetime_fallback(:utc, 1900, 2, 21, 17, 44, 30), DateTime.civil(1900, 2, 21, 17, 44, 30, 0, 0)
- assert_equal Time.time_with_datetime_fallback(:local, 1900, 2, 21, 17, 44, 30), DateTime.civil(1900, 2, 21, 17, 44, 30, DateTime.now.offset, 0)
+ assert_equal Time.time_with_datetime_fallback(:local, 1900, 2, 21, 17, 44, 30), DateTime.civil(1900, 2, 21, 17, 44, 30, DateTime.local_offset, 0)
assert_equal Time.time_with_datetime_fallback(:utc, 2005), Time.utc(2005)
assert_equal Time.time_with_datetime_fallback(:utc, 2039), DateTime.civil(2039, 1, 1, 0, 0, 0, 0, 0)
assert_equal Time.time_with_datetime_fallback(:utc, 2005, 2, 21, 17, 44, 30, 1), Time.utc(2005, 2, 21, 17, 44, 30, 1) #with usec

0 comments on commit f56c25d

Please sign in to comment.
Something went wrong with that request. Please try again.