show time correctly [it was failing at least in Windows]. see #2514

This commit is contained in:
Nikos Kouremenos 2006-11-25 14:34:53 +00:00
parent a37b946098
commit eed1a0c75e
1 changed files with 1 additions and 1 deletions

View File

@ -758,7 +758,7 @@ class ConversationTextview:
format += day_str + ' '
format += '%X'
tim_format = time.strftime(format, tim)
if locale.getpreferredencoding() == 'UTF-8':
if locale.getpreferredencoding() != 'KOI8-R':
# if tim_format comes as unicode because of day_str.
# we convert it to the encoding that we want (and that is utf-8)
tim_format = helpers.ensure_utf8_string(tim_format)