Post dates off by a day importing from Posterous
-
I want to import a blog that I use as a daily journal from Posterous to WordPress. But when I import the WordPress-formatted XML file that Posterous backup generates, all the posting dates are off by a day. I have tried playing with the format of the <wp:post_date> tag, but whatever I have tried has not worked – usually, nothing at all gets imported. If it helps, here is an example of a posting date tag from Posterous:
<wp:post_date>Sun Jun 24 23:50:00 2012</wp:post_date>The blog I need help with is: (visible only to logged in users)
-
Okay, I have figured out (1) why this happens and (2) how to fix it.
1) What seems to matter in the Posterous XML export is the WP post date tag, like:
<wp:post_date>Sun Jun 24 23:50:00 -0700 2012</wp:post_date>
In this example, the time is 11:50pm and the timezone offset (for Pacific time) is -7 hours. WordPress evidently adds 7 hours to the time and thereby shifts the post into the next day. If the time is, say, 8am, adding 7 hours keeps it in the same day and there is no problem.2) So, for a fix, replace all the timezone offsets with -0000, which keeps the time as it was set in Posterous. Tada!
A WARNING: The Posterous XML file is not formatted for readbility, and you may be tempted (as I was) to use a “tidy” on it, if your text editor supports that. DON’T! WordPress import evidently does not know to ignore the returns and tabs that tidying inserts, and you will get nothing imported at all.
Hope this helps.
- The topic ‘Post dates off by a day importing from Posterous’ is closed to new replies.