Correct problem for header and first record when time not at file start