def insert(self, packet, time=None, **kwargs):
        ''' Insert a packet into the database

        Arguments
            packet
                The :class:`ait.core.tlm.Packet` instance to insert into
                the database

            time
                Optional parameter specifying the time value to use when inserting
                the record into the database. Default case does not provide a time
                value so Influx defaults to the current time when inserting the
                record.

            tags
                Optional kwargs argument for specifying a dictionary of tags to
                include when adding the values. Defaults to nothing.
        
        '''
        fields = {}
        pd = packet._defn

        for defn in pd.fields:
            val = getattr(packet.raw, defn.name)

            if pd.history and defn.name in pd.history:
                val = getattr(packet.history, defn.name)
            
            if val is not None and not (isinstance(val, float) and math.isnan(val)):
                fields[defn.name] = val

        if len(fields) == 0:
            log.error('No fields present to insert into Influx')
            return

        tags = kwargs.get('tags', {})

        if isinstance(time, dt.datetime):
            time = time.strftime("%Y-%m-%dT%H:%M:%S")

        data = {
            'measurement': pd.name,
            'tags': tags,
            'fields': fields
        }

        if time:
            data['time'] = time

        self._conn.write_points([data])