0
我已經設置在environment.rb
config.time_zone = 'UTC'
,而我仍然得到了一些怪異的行爲Rails的內置日期時間字段:怪異created_at行爲
>> Time.now
=> Sun Jun 21 17:05:59 -0700 2009
>> Feedback.create(:body => "testing")
=> #<Feedback id: 23, body: "testing", email_address: nil, name: nil, created_at: "2009-06-22 00:06:09", updated_at: "2009-06-22 00:06:09">
>> Time.parse(Feedback.last.created_at.to_s)
=> Mon Jun 22 00:06:09 UTC 2009
有什麼想法?