diff -r 95c604ec89bf -r 57e956441ca4 utils.py --- a/utils.py Wed Aug 25 18:29:55 2010 +0200 +++ b/utils.py Wed Aug 25 18:55:58 2010 +0200 @@ -369,7 +369,7 @@ json_dumps = None else: - + from logilab.common.date import ustrftime class CubicWebJsonEncoder(json.JSONEncoder): """define a json encoder to be able to encode yams std types""" @@ -379,9 +379,9 @@ d['eid'] = obj.eid return d if isinstance(obj, datetime.datetime): - return obj.strftime('%Y/%m/%d %H:%M:%S') + return ustrftime(obj, '%Y/%m/%d %H:%M:%S') elif isinstance(obj, datetime.date): - return obj.strftime('%Y/%m/%d') + return ustrftime(obj, '%Y/%m/%d') elif isinstance(obj, datetime.time): return obj.strftime('%H:%M:%S') elif isinstance(obj, datetime.timedelta):