I have following problem.
handlers.py of project's django-piston api:
....
# "need" to set this for datetime.strftime()
locale.setlocale(locale.LC_TIME,'de_AT.UTF-8')
class ItemOverviewHandler(BaseHandler):
...
@classmethod
def date(self, item):
# because of the setlocale() call the datestring is in german
# that's good
return item.somedatefield.date.strftime("%d. %B %Y")
...
now it seems like this effects the project's feeds (created with django.contrib.syndication):
def item_pubdate(self, item):
return item.pub_date #datetime field
# the rss look's like this
# that's not good
<pubDate>Die, 17 Aug 2010 14:00:00 +0200</pubDate>
(this is an rfc conform date, BUT in german Die == Dienstag == Tuesday), thus it's invalid.
So I need the piston api response to be in german (done). but pubDate of the feed has to be in english (have no idea how to accomplish this).
Any suggestions?