Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ActiveRecord does not convert time attributes to proper timezone

#4659

Problem found in Rails3-beta3

ActiveRecord does convert the time attribute to UTC on saving to the database, but does not convert it back to the right timezone.

# config.time_zone = 'Amsterdam' (in application.rb)
ruby-1.8.7-p249 > e = Event.create(:event_time => Time.zone.parse("10:50")) # 'event_time' is a time-field
puts e.event_time 
#=> Thu May 20 10:50:00 +0200 2010
e.reload
puts e.event_time
#=> Sat Jan 01 08:50:00 UTC 2000 <-- ActiveRecord should convert this automatically right?

Reported by Matthijs Langenberg · May 20th, 2010 @ 12:29 PM

State: invalid
Milestone: none
Assigned to: nobody
Importance: High

Activity

  1. Rizwan Reza
    Rizwan Reza
    • No changes were found…

    May 21st, 2010 @ 12:42 AM

  2. Andrew White
    Andrew White
    • State changed from new to invalid
    • Importance changed from to High

    Can't reproduce this in RC so it must have been fixed at some point.

    August 23rd, 2010 @ 05:55 PM