format time for comments with python strftime(). no time localization so far.

svn path=/plone.app.discussion/trunk/; revision=27231
This commit is contained in:
Timo Stollenwerk 2009-05-31 11:01:36 +00:00
parent 0ce270bc66
commit 0d6045682f
1 changed files with 5 additions and 2 deletions

View File

@ -74,8 +74,11 @@ class CommentsViewlet(ViewletBase):
return '%s/login_form?came_from=%s' % (self.navigation_root_url, url_quote(self.request.get('URL', '')),)
def format_time(self, time):
return self.context.restrictedTraverse('@@plone').toLocalizedTime(time, long_format=True)
# Todo: return localized time
return time.strftime("%a, %d %b %Y %H:%M")
# XXX: Not working, returns None !!!
#return self.context.restrictedTraverse('@@plone').toLocalizedTime(time, long_format=True)
class AddComment(BrowserView):
"""Add a comment to a conversation
"""