type cast after attributes=

Hello, i have a problem with setting attributes.

Read from the DB. This attribut exists, fieldtype in DB is timestamp (PostgreSQL): "uebergabe_datum"=>"2007-04-03 10:32:00"

setting the attributes in controller with params= objekt.attributes = params[:my_params]

results in this: "uebergabe_datum"=>#<DateTime: 441754909/180,0,2299161>

Everything like expected.

But there's a case where the field "uebergabe_datum" isn't in the params hash. objekt.attributes isnt't casting the attribut, cause it isn't available.

loaded: "uebergabe_datum"=>"2007-04-03 10:32:00"

after attributes=: "uebergabe_datum"=>"2007-04-03 10:32:00"

with this value i'm not able to save the record.

how to get this: "uebergabe_datum"=>#<DateTime: 441754909/180,0,2299161> without the attribut in the params? i'm looking for something like objekt.cast_for_db

regards