[issue12371] datetime.now() bug
STINNER Victor
report at bugs.python.org
Mon Jun 20 12:44:20 CEST 2011
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
str(datetime object) doesn't contain a dot if obj.microsecond equals zero. You can use obj=obj.replace(microsecond=0) to create a new datetime object using microsecond=0. Or just test that str(obj) contains a dot or not.
It is not a bug in Python.
----------
nosy: +haypo
resolution: -> invalid
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12371>
_______________________________________
More information about the Python-bugs-list
mailing list