* morituri/result/logger.py:

Always write strftime in C locale.  Fixes second bug
	  mentioned in #49.
This commit is contained in:
Thomas Vander Stichele
2011-05-22 10:58:36 +00:00
parent 6c2f3cc378
commit 14d23e7a09
2 changed files with 11 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
2011-05-22 Thomas Vander Stichele <thomas at apestaart dot org>
* morituri/result/logger.py:
Always write strftime in C locale. Fixes second bug
mentioned in #49.
2011-05-21 Thomas Vander Stichele <thomas at apestaart dot org>
* morituri/common/checksum.py:

View File

@@ -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("")