diff options
author | Stefan Ritter <xeno@goliath.thehappy.de> | 2009-05-02 04:01:13 +0200 |
---|---|---|
committer | Stefan Ritter <xeno@goliath.thehappy.de> | 2009-05-02 04:01:13 +0200 |
commit | 8ae4586ab1bc7fdc2ee6d1a44878f41c1699161b (patch) | |
tree | 8eb08e59823924797d0022fe863dad08d3151bfe | |
parent | 0567d1e45ef28aa5971bccf986d56de570294f26 (diff) |
Atom is now valid for http://validator.w3.org/
-rwxr-xr-x | blogthon.cgi | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/blogthon.cgi b/blogthon.cgi index 8152472..2fcb619 100755 --- a/blogthon.cgi +++ b/blogthon.cgi @@ -161,8 +161,14 @@ if feed_display == "atom": # Atom need a 2byte string month = str(date[1]) day = str(date[2]) + hour = str(date[3]) + min = str(date[4]) + sec = str(date[5]) if len(str(date[1])) == 1: month = '0' + str(date[1]) if len(str(date[2])) == 1: day = '0' + str(date[2]) + if len(str(date[3])) == 1: hour = '0' + str(date[3]) + if len(str(date[4])) == 1: min = '0' + str(date[4]) + if len(str(date[5])) == 1: sec = '0' + str(date[5]) document_header("atom") print '<link href="' + blog_url + '/?feed=atom" rel="self" type="application/atom+xml"/>' @@ -171,13 +177,13 @@ if feed_display == "atom": print ' </author>' print ' <title>' + blog_title + '</title>' print ' <id>urn:uuid:' + blog_title_md5sum + '</id>' - print ' <updated>' + str(date[0]) + '-' + month + '-' + day + 'T' + str(date[3]) + ':' + str(date[4]) + ':' + str(date[5]) + 'Z</updated>' + print ' <updated>' + str(date[0]) + '-' + month + '-' + day + 'T' + hour + ':' + min + ':' + sec + 'Z</updated>' print '' print ' <entry>' print ' <title>' + title + '</title>' print ' <link href="' + blog_url + '"/>' print ' <id>urn:uuid:' + title_md5sum + '</id>' - print ' <updated>' + str(date[0]) + '-' + month + '-' + day + 'T' + str(date[3]) + ':' + str(date[4]) + ':' + str(date[5]) + 'Z</updated>' + print ' <updated>' + str(date[0]) + '-' + month + '-' + day + 'T' + hour + ':' + min + ':' + sec + 'Z</updated>' print ' </entry>' print '</feed>' |