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