Author skip.montanaro
Recipients brett.cannon, skip.montanaro, tim.peters, tungwaiyip, zooko
Date 2007-10-15.13:47:39
SpamBayes Score 0.0194398
Marked as misclassified No
Message-id <>
In-reply-to <>
Zooko> I meant that it special-cases .microseconds == 0.

Tim indicated in his comment that the behavior is both by design and
documented and isn't going to change.  In an earlier comment I showed how to
achieve the result you ased for in one line.  Here's another example using
your desire for millisecond display resolution:

    >>> dt.replace(microsecond=0).strftime("%Y-%m-%dT%H:%M:%S") + ".%03dZ" % (dt.microsecond//1000)

Also, I have a patch for py3k which adds a %f format specifier to strftime.
I still have to make some other additions, but you're more than welcome to
review what's there now:

Date User Action Args
2007-10-15 13:47:40skip.montanarosetspambayes_score: 0.0194398 -> 0.0194398
recipients: + skip.montanaro, tim.peters, brett.cannon, zooko, tungwaiyip
2007-10-15 13:47:39skip.montanarolinkissue1074462 messages
2007-10-15 13:47:39skip.montanarocreate