Immediately published posts are scheduled and published 2 hours later
The solution was to apt-get remove tzdata apt-get install tzdata while dpkg-reconfigure tzdata was not enough. Mark’s edit: In human words, the problem was caused because the time zone data on the server was incorrect, which probably had an impact how php calculates times. The solution was to forcefully update the data.