diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2010-06-08 00:10:11 -0400 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2010-06-08 00:10:11 -0400 |
commit | e404490f9bae102f8c7126917d59568e6d1fef79 (patch) | |
tree | 34a4fd7517026ab23498e7d2301f27ebd75cdee2 /activerecord/test/cases/date_time_test.rb | |
parent | 80a044edb663e6bc619b0755e30f9db10e37e9e8 (diff) | |
parent | 8d576b51a12fdb19e3993f3678ec64b2ea60fada (diff) | |
download | rails-e404490f9bae102f8c7126917d59568e6d1fef79.tar.gz rails-e404490f9bae102f8c7126917d59568e6d1fef79.tar.bz2 rails-e404490f9bae102f8c7126917d59568e6d1fef79.zip |
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'activerecord/test/cases/date_time_test.rb')
-rw-r--r-- | activerecord/test/cases/date_time_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/cases/date_time_test.rb b/activerecord/test/cases/date_time_test.rb index 36e1caa0b6..a8b4b7a096 100644 --- a/activerecord/test/cases/date_time_test.rb +++ b/activerecord/test/cases/date_time_test.rb @@ -5,7 +5,9 @@ require 'models/task' class DateTimeTest < ActiveRecord::TestCase def test_saves_both_date_and_time time_values = [1807, 2, 10, 15, 30, 45] - now = DateTime.civil(*time_values) + # create DateTime value with local time zone offset + local_offset = Rational(Time.local_time(*time_values).utc_offset, 86400) + now = DateTime.civil(*(time_values + [local_offset])) task = Task.new task.starting = now |