Trouble overriding default accessor/mutator

I have a database column storing a duration value as a number of
seconds, but I'd like users to be able to see it and edit it as a time
value. I am trying to override the default accessor/mutator for the
attribute and do the conversions there, using something that looks

  def duration[:duration].to_i).getutc

  def duration=(value)
    self[:duration] = value.to_i

Everything seems OK, but when I go to save the record, I get the

ActiveRecord::MultiparameterAssignmentErrors in

1 error(s) on assignment of multiparameter attributes

What am I missing?