Rails, PostgreSQL and Time

Date:

Tags:

I just noticed that the mapping between PostgreSQL’s Time Without TimeZone column type maps to Rubys standard Time class. Which gives the following behavior in script/console:

:::ruby

>> t = TimeEntry.find(1)
>> t.time
=> Sat Jan 01 23:00:00 +0100 2000
>> t.time = Time.now
=> Wed May 09 19:02:07 +0200 2007
>> t.save
=> true
>> t = TimeEntry.find(1)
>> t.time
=> Sat Jan 01 19:02:07 +0100 2000

Am I very anal to find this … sloppy?