Permalink
Browse files

create DateTime value with local offset as later it is compared to Ti…

…me value with local offset

(otherwise test is failing for oracle_enhanced JDBC adapter)
  • Loading branch information...
1 parent bf83c57 commit eec90bab2815642d1771c9f9c37bd5a0bcd6fc9d @rsim rsim committed Aug 7, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 activerecord/test/cases/date_time_test.rb
@@ -5,7 +5,9 @@
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

0 comments on commit eec90ba

Please sign in to comment.