誰かが d1 が d2 より大きい理由を説明できますか? それらは同じ日付です(少なくとも、私にはそう見えます)。
Loading development environment (Rails 3.0.8)
ruby-1.9.2-p180 :001 > d1 = Event.first.updated_at
=> Thu, 22 Sep 2011 02:24:28 PDT -07:00
ruby-1.9.2-p180 :002 > d2 = Time.zone.parse("2011-09-22T02:24:28-07:00")
=> Thu, 22 Sep 2011 02:24:28 PDT -07:00
ruby-1.9.2-p180 :003 > d1.class
=> ActiveSupport::TimeWithZone
ruby-1.9.2-p180 :004 > d2.class
=> ActiveSupport::TimeWithZone
ruby-1.9.2-p180 :005 > d1 > d2
=> true
ruby-1.9.2-p180 :006 >
私の特定のアプリケーションのニーズに関して...私はRailsアプリケーションにリクエストを送信するiOSアプリを持っています. 07:00」その日時を ActiveSupport::TimeWithZone タイプの「updated_at」と比較しようとしています。
ありがとう - wg