Can't really do anything with your code because you left out the rest of it. I do see you added a comment explaining that bars 2 and 3 were same as bar 1. But that does not provide a fully functional piece of code so I can't do anything with it.
Seems that your code is written by an engineer (trained in some discipline OTHER than computer science). They tend to write code using brute force methods rather than making the best use of available data structures to write as few lines as possible while leaving plenty of room for maintenance and growth.
The simplest solution here requires that you set the custom quote column to not include extended hours data. This completely eliminates the need to try to use specific time stamps. The additional advantage to my approach is that you can use this on any intraday time frame and it will still measure the first three bars of that time frame.
We could even write this in a more elegant way that provides a user adjustable input so the number of bars can be adjusted through a user input. But I don't have time to be that fancy when writing solutions in the Q&A forum.
def newDay = GetDay() <> GetDay()[1];
def uptrendBias = if newDay[2] then high > high[1] and high[1] > high[2] and low > low[1] and low[1] > low[2] else no;
def downtrendBias = if newDay[2] then high < high[1] and high[1] < high[2] and low < low[1] and low[1] < low[2] else no; rec bias = if newDay then 0 else if newDay[2] and uptrendBias then 1 else if newDay[2] and downtrendBias then -1 else bias[1]; plot data = bias; data.AssignValueColor(if bias > 0 then Color.GREEN else if bias < 0 then Color.RED else Color.CURRENT);