code: def query(self, domain):
          
          result = {}
  
          try:
              result = self.pdns.query(domain)
          except:
              self.error('Exception while querying passiveDNS. Check the domain format.')
  
          # Clean the datetime problems in order to correct the json serializability
          clean_result = []
          for ind, resultset in enumerate(result):
              if resultset.get('time_first', None):
                  resultset['time_first'] = resultset.get('time_first').isoformat(' ')
              if resultset.get('time_last', None):
                  resultset['time_last'] = resultset.get('time_last').isoformat(' ')
              clean_result.append(resultset)
  
          return clean_result
docs: The actual query happens here. Time from queries is replaced with isoformat.
  
          :param domain: The domain which should gets queried.
          :type domain: str
          :returns: List of dicts containing the search results.
          :rtype: [list, dict]