Commit 5a93ee8a authored by asciidoc3's avatar asciidoc3

Merge branch 'master' into 'master'

minor bugfix

See merge request !7
parents 76247df6 5450e1a7
......@@ -1587,11 +1587,14 @@ def time_str(t):
else:
result = s + ' ' + time.tzname[0]
# Attempt to convert the localtime to the output encoding.
try:
result = bytes(result, 'utf8')
result = result.decode(getdefaultlocale()[1])
except Exception:
pass # ... hoping that it will go anywhere
# but only if OS != Windows, see
# https://asciidoc3.org/blog/minor-bug-already-fixed-asciidoc3-303.html
if not sys.platform.lower().startswith('win'):
try:
result = bytes(result, 'utf8')
result = result.decode(getdefaultlocale()[1])
except Exception:
pass # ... hoping that it will go anywhere
return result
def date_str(t):
......
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