get timeformat in utf-8
This commit is contained in:
parent
aba2527be4
commit
27f1461abe
|
@ -28,6 +28,7 @@ import gtk.glade
|
|||
import pango
|
||||
import gobject
|
||||
import time
|
||||
import sys
|
||||
import tooltips
|
||||
import dialogs
|
||||
import locale
|
||||
|
@ -607,8 +608,9 @@ class ConversationTextview:
|
|||
if day_str:
|
||||
format += day_str + ' '
|
||||
format += '%X' + after_str
|
||||
tim_format = time.strftime(format, tim).decode(
|
||||
locale.getpreferredencoding())
|
||||
# format comes as unicode, because of day_str.
|
||||
# we convert it to the encoding that we want
|
||||
tim_format = time.strftime(format.encode('utf-8'), tim)
|
||||
buffer.insert_with_tags_by_name(end_iter, tim_format + ' ',
|
||||
*other_tags_for_time)
|
||||
elif gajim.config.get('print_time') == 'sometimes':
|
||||
|
|
Loading…
Reference in New Issue