[modules/datetime] Add encoding for locale
When creating the date/time string, use the locale's preferred encoding to format the string. hopefully, this fixes #158
This commit is contained in:
parent
474da05929
commit
8376e406e5
1 changed files with 2 additions and 1 deletions
|
@ -35,6 +35,7 @@ class Module(bumblebee.engine.Module):
|
|||
locale.setlocale(locale.LC_TIME, lcl.split("."))
|
||||
|
||||
def get_time(self, widget):
|
||||
return datetime.datetime.now().strftime(self._fmt)
|
||||
enc = locale.getpreferredencoding()
|
||||
return datetime.datetime.now().strftime(self._fmt).decode(enc)
|
||||
|
||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||
|
|
Loading…
Reference in a new issue