def ruby_to_sdb(name, value)
      return nil if value.nil?
      name     = name.to_s
#            puts "Converting #{name} to sdb value=#{value}"
#            puts "atts_local=" + defined_attributes_local.inspect

      att_meta = get_att_meta(name)

      if value.is_a? Array
        ret = value.collect { |x| ruby_to_string_val(att_meta, x) }
      else
        ret = ruby_to_string_val(att_meta, value)
      end

      unless value.blank?
        if att_meta.options
          if att_meta.options[:encrypted]
#                    puts "ENCRYPTING #{name} value #{value}"
            ret = Translations.encrypt(ret, att_meta.options[:encrypted])
#                    puts 'encrypted value=' + ret.to_s
          end
          if att_meta.options[:hashed]
#                        puts "hashing #{name}"
            ret = Translations.pass_hash(ret)
#                        puts "hashed value=" + ret.inspect
          end
        end
      end

      return ret

    end
def ruby_to_sdb(name, value)
      return nil if value.nil?
      name     = name.to_s
#            puts "Converting #{name} to sdb value=#{value}"
#            puts "atts_local=" + defined_attributes_local.inspect

      att_meta = get_att_meta(name)

      if value.is_a? Array
        ret = value.collect { |x| ruby_to_string_val(att_meta, x) }
      else
        ret = ruby_to_string_val(att_meta, value)
      end

      unless value.blank?
        if att_meta.options
          if att_meta.options[:encrypted]
#                    puts "ENCRYPTING #{name} value #{value}"
            ret = Translations.encrypt(ret, att_meta.options[:encrypted])
#                    puts 'encrypted value=' + ret.to_s
          end
          if att_meta.options[:hashed]
#                        puts "hashing #{name}"
            ret = Translations.pass_hash(ret)
#                        puts "hashed value=" + ret.inspect
          end
        end
      end

      return ret

    end
Time to second precision