Zooko O'Whielacronx added the comment: Here is a note for the next person who comes to this ticket wondering why isoformat() exhibits this slightly un-Pythonic behavior. If you want to use isoformat() to produce, for example, timestamps for your logfiles, you'll need to do something like the following. (I do hope you noticed the documentation and didn't use isoformat() in the naive way, or your log files will very rarely have a different format than you expected.)
d = datetime.datetime.utcfromtimestamp(when) if d.microsecond: return d.isoformat(" ")[:-3]+"Z" else: return d.isoformat(" ") + ".000Z" http://allmydata.org/trac/tahoe/browser/src/allmydata/node.py#L21 ---------- nosy: +zooko _____________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1074462> _____________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com