create DateTime value with local offset as later it is compared to Time value with local offset
(otherwise test is failing for oracle_enhanced JDBC adapter)
This commit is contained in:
parent
bf83c5709f
commit
eec90bab28
@ -5,7 +5,9 @@
|
|||||||
class DateTimeTest < ActiveRecord::TestCase
|
class DateTimeTest < ActiveRecord::TestCase
|
||||||
def test_saves_both_date_and_time
|
def test_saves_both_date_and_time
|
||||||
time_values = [1807, 2, 10, 15, 30, 45]
|
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 = Task.new
|
||||||
task.starting = now
|
task.starting = now
|
||||||
|
Loading…
Reference in New Issue
Block a user