def roll_dts_to_midnight(dts, env):
    if len(dts) == 0:
        return dts

    return pd.DatetimeIndex(
        (dts.tz_convert('US/Eastern') - pd.Timedelta(hours=16)).date,
        tz='UTC',
    ) + env.trading_day
dataset/ETHPy150Open quantopian/zipline/zipline/sources/requests_csv.py/roll_dts_to_midnight/original