# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1239967265 -7200 # Node ID 6cbc7bc8ea6d19fc5b4c252db1ebc2561e9c2c5e # Parent daaebf6b9922d9f59edac08ba4ba9268214914e2 rollback florent's not-proven-to-be-useful fix diff -r daaebf6b9922 -r 6cbc7bc8ea6d utils.py --- a/utils.py Fri Apr 17 13:17:21 2009 +0200 +++ b/utils.py Fri Apr 17 13:21:05 2009 +0200 @@ -9,7 +9,7 @@ import locale from md5 import md5 from datetime import datetime, timedelta, date -from time import time, strftime +from time import time from random import randint, seed # initialize random seed from current time @@ -53,7 +53,7 @@ """ # date format may depend on the locale encoding = locale.getpreferredencoding(do_setlocale=False) or 'UTF-8' - return unicode(strftime(str(fmt), date.timetuple()), encoding) + return unicode(date.strftime(str(fmt)), encoding) def make_uid(key): """forge a unique identifier"""