Skip to content

ActiveSupport::TimeWithZone compare fails between Time/DateTime in 3.1 (3.0 works) #3431

@jconley

Description

@jconley

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

t1.eql?(t2) is also affected, returning nil instead of true in 3.1.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions