<pubDate> format in php and Excel

Doing some WXR export file hacking/generation to import some html tabular data as custom post types in WordPress.

The WXR format is based on the Really Simple Syndication or Rss specification which is a very popular dialect of XML. It has been designed as a syndication format for websites who wish to share and serialise some of their data.

Tricky to deal with can be the RSS tag, which Specifies the publication date for an RSS feed/item. Your date needs to be in RFC-822 date-time. I hazard to bet your date may not be in this format!

If you’d like to convert/view your date in PHP, try

strftime("%a, %d %b %Y %H:%M:%S %z")

If you’re working from a csv, here’s how to convert/display this format in Excel:

Number -> Custom -> Type: ddd, dd mmm yyyy h:mm:ss "+0000" (where “+0000″ is your GMT offset).

What say you?