diff --git a/ChangeLog b/ChangeLog index a4405e6..b3d4244 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-05-22 Thomas Vander Stichele + + * morituri/result/logger.py: + Always write strftime in C locale. Fixes second bug + mentioned in #49. + 2011-05-21 Thomas Vander Stichele * morituri/common/checksum.py: diff --git a/morituri/result/logger.py b/morituri/result/logger.py index f0eb187..16f2eda 100644 --- a/morituri/result/logger.py +++ b/morituri/result/logger.py @@ -39,7 +39,12 @@ class MorituriLogger(object): ### global lines.append("Logfile created by: morituri %s" % configure.version) + # FIXME: when we localize this, see #49 to handle unicode properly. + import locale + old = locale.getlocale(locale.LC_TIME) + locale.setlocale(locale.LC_TIME, 'C') date = time.strftime("%b %d %H:%M:%S", time.localtime(epoch)) + locale.setlocale(locale.LC_TIME, old) lines.append("Logfile created on: %s" % date) lines.append("")