public
Fork of NZKoz/koz-rails
Description: Koz's rails git-svn clone
Homepage: http://www.rubyonrails.org
Clone URL: git://github.com/eventualbuddha/koz-rails.git
test_native_types expects DateTime.local_offset instead of 
DateTime.now.offset; fixes test breakage due to dst transition

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9003 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
gbuesing (author)
Sun Mar 09 23:48:15 -0700 2008
commit  611565a55951bb7eaca0351b0aa22c395cb62981
tree    51922f1119bd3d09da4faaab0ef66c064c1c9f34
parent  062f3479d8ecba5ee27fe2bdab356aa688a644ad
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 *SVN*
0
 
0
+* test_native_types expects DateTime.local_offset instead of DateTime.now.offset; fixes test breakage due to dst transition [Geoff Buesing]
0
+
0
 * Add :readonly option to HasManyThrough associations. #11156 [miloops]
0
 
0
 * Improve performance on :include/:conditions/:limit queries by selectively joining in the pre-query. #9560 [dasil003]
...
330
331
332
333
 
334
335
336
...
330
331
332
 
333
334
335
336
0
@@ -330,7 +330,7 @@ if ActiveRecord::Base.connection.supports_migrations?
0
       # Test DateTime column and defaults, including timezone.
0
       # FIXME: moment of truth may be Time on 64-bit platforms.
0
       if bob.moment_of_truth.is_a?(DateTime)
0
- assert_equal DateTime.now.offset, bob.moment_of_truth.offset
0
+ assert_equal DateTime.local_offset, bob.moment_of_truth.offset
0
         assert_not_equal 0, bob.moment_of_truth.offset
0
         assert_not_equal "Z", bob.moment_of_truth.zone
0
         assert_equal DateTime::ITALY, bob.moment_of_truth.start

Comments

    No one has commented yet.