Commit 06d440fa authored by Dan Pascu's avatar Dan Pascu

Fixed unicode problem with certain locales

parent 5e83dcef
......@@ -5,6 +5,7 @@ from __future__ import division
__all__ = ['ChatWindow']
import locale
import os
import re
......@@ -239,11 +240,13 @@ class ChatContent(object):
@property
def date(self):
return self.timestamp.strftime('%d %b %Y')
language, encoding = locale.getlocale(locale.LC_TIME)
return self.timestamp.strftime('%d %b %Y').decode(encoding or 'ascii')
@property
def time(self):
return self.timestamp.strftime('%H:%M')
language, encoding = locale.getlocale(locale.LC_TIME)
return self.timestamp.strftime('%H:%M').decode(encoding or 'ascii')
@property
def text_direction(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment