X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=XMLWriter.py;h=38904dcf3874d6e216ac760d3387d068af81dd29;hb=8afc0d268787b7b3cb06dcc50e06707d31a5af68;hp=5b0582ea7b8cf761f76841f85a06db3690a07049;hpb=73c1202987332c16b1ea6919aa635113bd3ce6cd;p=planet-ucc.git diff --git a/XMLWriter.py b/XMLWriter.py index 5b0582e..38904dc 100644 --- a/XMLWriter.py +++ b/XMLWriter.py @@ -60,8 +60,8 @@ class Planet: if lastItem == None: break # this checks to see if it's a new day - if time.gmtime(lastItem.itemDate)[6] != lastDate: - lastDate = time.gmtime(lastItem.itemDate)[6] + if time.localtime(lastItem.itemDate)[6] != lastDate: + lastDate = time.localtime(lastItem.itemDate)[6] workingDate = PlanetDate(lastItem.itemDate) self.dates.append(workingDate) # append the item to the current date @@ -96,7 +96,7 @@ class XHTMLWriter: output += '
\n' if item.imageURL: output += '\n' % (item.imageLink, item.imageURL, item.blogTitle) - output += '(%s)\n' % (item.itemURL ,time.strftime('%A %B %d, %Y %H:%M UTC', time.gmtime(item.itemDate))) + output += '(%s)\n' % (item.itemURL ,time.strftime('%A %B %d, %Y %H:%M AWST', time.localtime(item.itemDate))) output += '
\n' output += '\n' output += item.contents @@ -129,18 +129,20 @@ class XHTMLWriter: pass output += '
\n' - output += '%s\n' % time.strftime('%A %B %d, %Y %H:%M UTC', time.gmtime()) + output += '%s\n' % time.strftime('%A %B %d, %Y %H:%M AWST', time.localtime()) output += '
\n' if self.parent: output += '\n'
- for blog in self.parent.blogs:
- output += '%s
\n' % (blog.blogURL, blog.blogTitle)
+ blogscopy = self.parent.blogs + []
+ blogscopy.sort(self.__blog_sort__)
+ for blog in blogscopy:
+ output += '%s (feed)
\n' % (blog.blogURL, blog.blogTitle, blog.feedURL)
output += '