{"id":382,"date":"2002-10-25T10:53:06","date_gmt":"2002-10-25T10:53:06","guid":{"rendered":"http:\/\/sunpig.com\/mt-entry-382.html"},"modified":"2006-09-23T19:30:11","modified_gmt":"2006-09-23T19:30:11","slug":"valid-rss","status":"publish","type":"post","link":"https:\/\/sunpig.com\/martin\/2002\/10\/25\/valid-rss\/","title":{"rendered":"Valid RSS"},"content":{"rendered":"<p>I&#8217;ve made a couple of minor changes to the <a href=\"\/martin\/index.rss\">RSS Feed<\/a> for my blog.  It&#8217;s still RSS 0.91 (I haven&#8217;t had the time to get to grips with about 1.0 or 2.0 yet&#8211;but soon!), but now it&#8217;s <em>valid<\/em> RSS 0.91, as validated by <a href=\"http:\/\/diveintomark.org\/\">Mark Pilgim<\/a> and <a href=\"http:\/\/intertwingly.net\/blog\/\">Sam Ruby&#8217;s<\/a> new <a href=\"http:\/\/feeds.archive.org\/validator\/\">RSS validation service<\/a>.<\/p>\n<p style=\"text-align:center;\"><a href=\"http:\/\/feeds.archive.org\/validator\/check?url=http:\/\/www.sunpig.com\/martin\/index.rss\"><img loading=\"lazy\" decoding=\"async\" src=\"\/images\/site\/valid-rss.png\" alt=\"Valid RSS\" title=\"Valid RSS\" width=\"88\" height=\"31\" \/><\/a><\/p>\n<p>The main change involved the lastBuildDate and pubDate elements, which have to be in <a href=\"http:\/\/www.faqs.org\/rfcs\/rfc822.html\">RFC 822<\/a> format (e.g., <code>Fri, 25 Oct 2002 07:04:23 +0100<\/code>).  Movable Type can generate a date like this quite happily: <code>&lt;$MTEntryDate format=\"%a, %d %b %Y %H:%M:%S +0100\" $&gt;<\/code>.  But the problem with this is that the time zone (+0100) is now hard-coded.  If you change the Time Zone setting in your blog preferences, the RSS feed won&#8217;t match up any more.<\/p>\n<p>Not that big a deal, really, but it&#8217;s not as elegant as having it pick up the time zone automatically.  Movable Type does actually have a time zone element (<code>&lt;$MTBlogTimeZone$&gt;<\/code>), but it generates the time zone with a colon in the middle, i.e. as &#8220;+01:00&#8221;.<\/p>\n<p><a href=\"http:\/\/daringfireball.net\/\">John Gruber<\/a> has put together a new <a href=\"http:\/\/daringfireball.net\/2002\/10\/valid_rss_091_feeds_from_movable_type.html\">MT plugin<\/a> which provides the time zone in RFC 822 format.  You can use this to build up a proper, dynamic RFC 822 date like so:  <code>&lt;$MTEntryDate format=\"%a, %d %b %Y %H:%M:%S\" $&gt; &lt;$MTrfc822BlogTimeZone$&gt;<\/code>.  Note that you do need that space between the two tags&#8211;if you cut-and-paste from the sample code in the plugin documentation, it&#8217;s not there.<\/p>\n<p>Alternatively, you can <a href=\"\">use Brad Choate&#8217;s regex plugin<\/a>.  This doesn&#8217;t give you an extra tag, but instead allows you to apply a regular expression to the output of a standard MT tag, like so:  <code>&lt;$MTBlogTimezone regex=\"s\/:\/\/\"$&gt;<\/code>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve made a couple of minor changes to the RSS Feed for my blog. It&#8217;s still RSS 0.91 (I haven&#8217;t had the time to get to grips with about 1.0 or 2.0 yet&#8211;but soon!), but now it&#8217;s valid RSS 0.91, as validated by Mark Pilgim and Sam Ruby&#8217;s new RSS validation service. The main change &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/sunpig.com\/martin\/2002\/10\/25\/valid-rss\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Valid RSS&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[],"class_list":["post-382","post","type-post","status-publish","format-standard","hentry","category-rss"],"_links":{"self":[{"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/posts\/382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/comments?post=382"}],"version-history":[{"count":0,"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/posts\/382\/revisions"}],"wp:attachment":[{"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/media?parent=382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/categories?post=382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sunpig.com\/martin\/wp-json\/wp\/v2\/tags?post=382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}