> e = Event.first
> e.registration_start_utc
=> Sat, 23 Oct 2010 06:38:00 UTC +00:00
> e.registration_start_utc.utc?
=> true
> ActiveSupport::TimeZone.find_tzinfo("America/New_York").utc_to_local(e.registration_start_utc)
=> Sat, 23 Oct 2010 02:38:00 UTC +00:00
2 questions:
1) Why is this last output showing "UTC" - hour converted (6 => 2), but it still says UTC. Why not EST / EDT?
2) What happens after daylight saving, and the shift for New York is from -4 to -5? The value in the database does not change, so my only conclusion is that my application will start showing "1:38" everywhere instead of the correct 2:38?
I mainly deal with # 2. # 1 - it's rather a curiosity.
Thank!
source
share