Fixed Atom-Timestamp
This commit is contained in:
parent
6c4970adff
commit
5c5c0cdf0b
@ -118,7 +118,7 @@ try: smtp_host = configuration.get('smtp', 'smtp_host')
|
|||||||
except: errorpage('"smtp_host" is missing in configuration!')
|
except: errorpage('"smtp_host" is missing in configuration!')
|
||||||
|
|
||||||
try: feed_preview = configuration.get('feed', 'feed_preview')
|
try: feed_preview = configuration.get('feed', 'feed_preview')
|
||||||
except: errorpage('"feed_preview" is missing or empty in configuration')
|
except: errorpage('"feed_preview" is missing or empty in configuration!')
|
||||||
|
|
||||||
# Read POST Variables
|
# Read POST Variables
|
||||||
action = cgi.FieldStorage()
|
action = cgi.FieldStorage()
|
||||||
@ -224,13 +224,13 @@ if feed_display == "atom":
|
|||||||
if j > 10: j = 10
|
if j > 10: j = 10
|
||||||
for i in xrange(0, j):
|
for i in xrange(0, j):
|
||||||
title = str(entries[i][1]).replace('entries/', '', 1).replace('.' + entries_suffix, '')
|
title = str(entries[i][1]).replace('entries/', '', 1).replace('.' + entries_suffix, '')
|
||||||
date = time.strftime("%a, %d %b %Y %H:%M:%S %z", time.gmtime(time.mktime(entries[i][0])))
|
date = entries[i][0]
|
||||||
title_md5sum = generate_uuid(title)
|
title_md5sum = generate_uuid(title)
|
||||||
print ' <entry>'
|
print ' <entry>'
|
||||||
print ' <title>' + title + '</title>'
|
print ' <title>' + title + '</title>'
|
||||||
print ' <link href="' + blog_url + '?p=' + title + '"/>'
|
print ' <link href="' + blog_url + '?p=' + title + '"/>'
|
||||||
print ' <id>urn:uuid:' + title_md5sum + '</id>'
|
print ' <id>urn:uuid:' + title_md5sum + '</id>'
|
||||||
print ' <updated>' + date + '</updated>'
|
print ' <updated>' + str(date[0]) + '-' + month + '-' + day + 'T' + hour + ':' + min + ':' + sec + 'Z</updated>'
|
||||||
print ' <summary>'
|
print ' <summary>'
|
||||||
content = open(str(entries[i][1]), 'r')
|
content = open(str(entries[i][1]), 'r')
|
||||||
for h in xrange(0, int(feed_preview)):
|
for h in xrange(0, int(feed_preview)):
|
||||||
|
@ -14,7 +14,7 @@ staticpages: True
|
|||||||
monthlist: True
|
monthlist: True
|
||||||
linklist: True
|
linklist: True
|
||||||
permalinks: True
|
permalinks: True
|
||||||
comments:
|
comments: True
|
||||||
newest_first: True
|
newest_first: True
|
||||||
|
|
||||||
[smtp]
|
[smtp]
|
||||||
|
Loading…
Reference in New Issue
Block a user