richcollins
richcollins

Reputation: 1544

TimeWithZone comparison woes

>> t = Time.zone.now; a = Account.create(:last_result_at => t); a.reload.last_result_at == t
=> false
>> t
=> Fri, 24 Jul 2009 21:52:16 UTC +00:00
>> a.last_result_at
=> Fri, 24 Jul 2009 21:52:16 UTC +00:00

What gives?

Upvotes: 0

Views: 181

Answers (1)

richcollins
richcollins

Reputation: 1544

The usec component was dropped when storing in the db

Upvotes: 1

Related Questions