def _normalize_interval(start, end, value):
    if not isinstance(start, datetime):
        start = datetime.combine(start, START_OF_DAY)
        end = datetime.combine(end, START_OF_DAY)

    if start.tzinfo is None:
        start = pytz.UTC.localize(start)
        end = pytz.UTC.localize(end)
    else:
        start = start.astimezone(pytz.UTC)
        end = end.astimezone(pytz.UTC)

    return start, end
Normalize datetime intervals.
dataset/ETHPy150Open noirbizarre/flask-restplus/flask_restplus/inputs.py/_normalize_interval