We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa945a8 commit cf5b380Copy full SHA for cf5b380
code_comments/comment.py
@@ -7,7 +7,7 @@
7
8
import trac.wiki.formatter
9
from trac.mimeview.api import Context
10
-from time import strftime, localtime
+from trac.util.datefmt import format_datetime, user_time
11
from code_comments import db
12
from trac.util import Markup
13
from trac.web.href import Href
@@ -129,9 +129,7 @@ def path_link_tag(self):
129
return Markup('<a href="%s">%s</a>' % (self.href(), self.link_text()))
130
131
def formatted_date(self):
132
- encoding = locale.getlocale()[1] if locale.getlocale()[1] else 'utf-8'
133
- return strftime('%d %b %Y, %H:%M',
134
- localtime(self.time)).decode(encoding)
+ return user_time(self.req, format_datetime, self.time, '%x %X')
135
136
def get_ticket_relations(self):
137
query = """
0 commit comments