0

I am using pymongo to save a datetime of the insertion of a document in a mongo collection here with the insert function:

cur_article['time'] = datetime.datetime.utcnow()

def insert(self, collection, doc):
    collection = self.get_db_instance(collection)
    collection.replace_one({'_id':doc['_id']} , doc, upsert=True)
    return True

For some reason though after insertion the datetimes only show up to the date for some not a whole timestamp. I am trying to find why as I would like a specific time tag. dbreturn

Jacob B
  • 694
  • 10
  • 21

0 Answers0