code: def __force_datetime(self, obj):
          
          if isinstance(obj, datetime.datetime):
              return obj
  
          t = datetime.time(0, 0)
          return datetime.datetime.combine(obj, t)
docs: Converts ojb to time.datetime.datetime
  
          YAML parsing returns either date or datetime object depending
          on how the date is written. YYYY-MM-DD will return a date and
          YYYY-MM-DDThh:mm:ss will return a datetime
  
          :param obj: date or datetime object