look to me like your machine time ?
yes it is the machine's time.
Responding to everything else:
My original method was exactly as you said which is to listen to bar.date and when a new bar.date is received, take the bar data with it. And here lied the problem I am facing which was that
the bar data coming with the new bar.date every minute would have bar.close = bar.high = bar.open.?So the reason for printing out my computer's time alongside the bar data in a continuous loop was to diagnose the problem to see what was happening. What I found out was that
the minute's bar data was being received sometime in the 59th second or the 1st second of the next minute. But that of course depended on my machine's time and how much it differed with ib servers. Regardless though, you can see the problem from my post with the example or in this example where I am printing out bar data alongside my computer's time:
2023-02-16 19:41:58.769470
{'close': 211.04, 'high': 211.51, 'low': 210.93, 'date': '20230216 19:41:00 Europe/Berlin'}
2023-02-16 19:41:59.221647
{'close': 211.17, 'high': 211.51, 'low': 210.93, 'date': '20230216 19:41:00 Europe/Berlin'}
2023-02-16 19:41:59.270578
{'close': 211.2, 'high': 211.2, 'low': 211.2, 'date': '20230216 19:42:00 Europe/Berlin'}
59.270578 - 59.221647
0.05 second window to grab the 1 minute bar before it starts building the next bar. Irrelevant though but just an observation.So with this method, I verified my problem that when I receive a new bar.date, I also receive with it wrong bar data regardless of my computer's time.
So now I just collect bar data between the 59th second and the 1st second of the next minute and when I receive a bar with high = close = low, then the correct bar for the minute is the previous bar. Now I am just worried about data limitations in the future since this solution feels like a workaround and requests a lot of ticks in the small 3 second window.
But somewhere it's back to same issue, you need to trust IB time marker (and it seems that they build it as it should)
I don't trust it.