The market is closed, so if your platform was not open when it closed, you will have a datetime in the past. It's not linked to the bar time.
Aha!
That makes sense.
Here's what I did.
Thurs: Shut down metatrader
Sat: Opened it up and it must have downloaded the history but kept TimeCurrent() from Thurs.
Thanks :)

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
When I run the following line of code against the EURUSD I get a value of: D'2016.05.05 21:52:41'
However when I open up a chart in Metatrader the last bar is '2016.05.06 23:55'.
As per the TimeCurrent() documentation (https://www.mql5.com/en/docs/dateandtime) for Mql 5 the time current does the following "Returns the last known server time (time of the last quote receipt) in the datetime format"
In the scenario above I have a TimeCurrent() '2016.05.05 21:52:41' that is two days before the last date I can see on the chart '2016.05.06 23:55'.
Any ideas what's going on here?