rails/rails — Issue #3431: ActiveSupport::TimeWithZone compare fails between Time/DateTime in 3.1 (3.0 works)
Author: jconley
Created: 2011-10-25 04:11:44+00:00
State: open

test case:

time_string = '2012-02-10T16:55:00+00:00'
t1 = Time.parse(time_string).in_time_zone
t2 = DateTime.parse(time_string).in_time_zone
t1 <=> t2

correct result of 0 in rails 3.0.10
invalid result of nil in rails 3.1.1