I get the following error after upgrading to 1.2.3.
NoMethodError (undefined method `usec' for #<DateTime: 212045465540169721/86400000000,0,2299161>):
/var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/postgresql_adapter.rb:579:in `cast_to_time'
If you look at the code you can see that usec is added in the 1.2 versions.
1.2 Stable
576 def cast_to_time(value)
577 return value unless value.class == DateTime
578 v = value
579 time_array = [v.year, v.month, v.day, v.hour, v.min, v.sec, v.usec]
580 Time.send(Base.default_timezone, *time_array) rescue nil
581 end
Which wasn't there in 1.1
1.1 Stable
499 def cast_to_time(value)
500 return value unless value.class == DateTime
501 v = value
502 time_array = [v.year, v.month, v.day, v.hour, v.min, v.sec]
503 Time.send(Base.default_timezone, *time_array) rescue nil
504 end
As far as I know DateTime class doesn't have a usec method.