Properly format publish date.

fixes #1335
Merge pull request #1338 from halfdan/1335-publish-date-format

Properly format publish date.