LPS-39594 last publish date publishing fix - revisited - please read comments

Hey Brian,

I've checked your changes and although I see your point with the optimize commit, we have to mark the time before the publication process because we might miss entities in the next publication window. Also original LayoutExport code piece marked the time before the process for the same reason. For the update we have to update if the process was successful so that's why the time is being marked in the beginning of the process and updated at the end.

Thanks,

Máté