The environment.rb file in a Rails 2.3.2 app says:
Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
Auto-convert to this zone… when?
Also, what are the differences between these two statements?
config.time_zone = xxx
config.active_record.default_timezone = xxx
I ask these questions because I have a scenario whereby an AR-backed
object, when issued the “published_at” method yields a date like “Tue
Jul 28 17:04:58 UTC 2009”. However, when finding the object, e.g.
Object.first, I get what looks like a UTC date: “2009-07-28 17:07:11”.
(That is, when you find an object in console it shows you all its
attributes, and it is in there that I have what I think is a UTC date.)
So… what’s the deal?