elif node2.nodeType == 1 and node2.tagName == 'dc:date':
date = self.__retrieve_value__(node2)
try:
- item.itemDate = time.mktime(time.strptime(date, '%Y-%m-%dT%H:%M:%S+07:00'))
+ item.itemDate = time.mktime(time.strptime(date, '%Y-%m-%dT%H:%M:%S+07:00')) + 3600
except:
sys.stderr.write("DEBUG: RDFParse: time string %s unparseable\n" % date)
elif node2.nodeType == 1 and node2.tagName == 'description':
item.itemTitle = self.__retrieve_value__(node)
elif node.nodeType == 1 and node.tagName == 'pubDate':
try:
- item.itemDate = time.mktime(time.strptime(self.__retrieve_value__(node), '%a, %d %b %Y %H:%M:%S %Z'))
+ item.itemDate = time.mktime(time.strptime(self.__retrieve_value__(node), '%a, %d %b %Y %H:%M:%S GMT')) + 28800
except:
try:
- item.itemDate = time.mktime(time.strptime(self.__retrieve_value__(node), '%a, %d %b %Y %H:%M:%S +0000'))
+ item.itemDate = time.mktime(time.strptime(self.__retrieve_value__(node), '%a, %d %b %Y %H:%M:%S +0000')) + 28800
except:
sys.stderr.write("DEBUG: RSS2Parse: time string %s unparseable\n" % self.__retrieve_value__(node))
elif node.nodeType == 1 and node.tagName == 'link':
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
output += '<p class="time">\n'
if item.imageURL:
output += '<a class="image" href="%s"><img class="image" src="%s" alt="%s" /></a>\n' % (item.imageLink, item.imageURL, item.blogTitle)
- output += '(<a href="%s">%s</a>)\n' % (item.itemURL ,time.strftime('%A %B %d, %Y %H:%M UTC', time.gmtime(item.itemDate)))
+ output += '(<a href="%s">%s</a>)\n' % (item.itemURL ,time.strftime('%A %B %d, %Y %H:%M AWST', time.localtime(item.itemDate)))
output += '</p>\n'
output += '<p class="body">\n'
output += item.contents
pass
output += '<h2>Last Updated</h2>\n'
output += '<p>\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 += '</p>\n'
if self.parent:
output += '<h2>Feeds</h2>\n'
output += '</div>\n'
output += '<div class="items">\n'
for date in self.planet:
- output += '<h1>%s</h1>\n' % time.strftime('%A %B %d, %Y', time.gmtime(date.planetDate))
+ output += '<h1>%s</h1>\n' % time.strftime('%A %B %d, %Y', time.localtime(date.planetDate))
for item in date.items:
output += self.__write_item__(item)
# see how many items we've written