The datetime object should not be converted to a string. It should be:
time = db.Column(db.DateTime,nullable=False,default=(datetime.datetime.now))