what is the difference between export bar and export codes if the .bar contains daily data. It seems export bar works without any issue but export giving wrong data in open and close price for last EOD date. i thinks its bug in code. please check below

export bar code result:
8/9/2016 0:00 579.19757 596.33832 579.19757 593.09955

9/9/2016 0:00 593.04968 593.54791 576.00861 578.5

export result:

9/8/2016 1:00 579.2 596.3 579.2 593.1
9/9/2016 1:00 579.2 596.3 579.2 593.1