Past perfect and time marks

Is it correct to say:

“He worried because he had leaved the office at 6.10 p.m., but it was not allowed to stay there after the end of the working day (6p.m.)”

.
No. I suggest:

He worried because he had left the office at 6.10 pm, although he was not allowed to stay there after the end of the work day (6 pm).
.