'Convert value is in \'HH:MM:SS\' format to datetime.timedelta.
If not value, returns 0.
If value is float (backward compatibility issue), convert to timedelta.'

def from_json(self, value):

    if (not value):
        return datetime.timedelta(seconds=0)
    if isinstance(value, datetime.timedelta):
        return value
    if isinstance(value, float):
        return datetime.timedelta(seconds=value)
    if isinstance(value, basestring):
        return self.isotime_to_timedelta(value)
    msg = "RelativeTime    Field    {0}    has    bad    value    '{1!r}'".format(self.name, value)
    raise TypeError(msg)
