Adds time part to dobj if its a date object, returns dobj
        untouched if its a datetime object.

def ensure_datetime(dobj, time_part=None):
    """
        Adds time part to dobj if its a date object, returns dobj
        untouched if its a datetime object.
    """
    if isinstance(dobj, dt.datetime):
        return dobj
    return dt.datetime.combine(dobj, time_part or dt.time())