iBarShift not returning correct index?

 
    datetime day_time = iTime(Symbol(),PERIOD_D1,2);
    double   day_price= iHigh(Symbol(),PERIOD_D1,2);

    int shift=iBarShift(Symbol(),PERIOD_M15,day_time);

    datetime actual_time = iTime(Symbol(),PERIOD_M15,shift);
    double actual_price = iHigh(Symbol(),PERIOD_M15,shift);

as you can see the image below the day_time != actual_time . there is a difference in 15min time.  shouldn't they both return same time and same goes for the price?

 

 

Definitely prices are not the same. One of them returns the highest price in day and the other returns the highest price in a 15-minute duration.

But about the time it could be because the exact starting time of the day does not exist in M15 timeframe. iBarshift returns the closest bar index in this case.

 
got it thx