Hi, I have tried this code on Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32. It seems that it is possible to have no milliseconds returned by datetime.now.
while 1: ... datetime.now(pytz.utc) datetime.datetime(2011, 2, 17, 23, 48, 17, 984000, tzinfo=<UTC>) datetime.datetime(2011, 2, 17, 23, 48, 17, 984000, tzinfo=<UTC>) datetime.datetime(2011, 2, 17, 23, 48, 18, tzinfo=<UTC>) datetime.datetime(2011, 2, 17, 23, 48, 18, tzinfo=<UTC>) datetime.datetime(2011, 2, 17, 23, 48, 18, tzinfo=<UTC>) ... datetime.datetime(2011, 2, 17, 23, 48, 18, tzinfo=<UTC>) datetime.datetime(2011, 2, 17, 23, 48, 18, tzinfo=<UTC>) ... datetime.datetime(2011, 2, 17, 23, 48, 18, 15000, tzinfo=<UTC>) datetime.datetime(2011, 2, 17, 23, 48, 18, 15000, tzinfo=<UTC>) datetime.datetime(2011, 2, 17, 23, 48, 18, 15000, tzinfo=<UTC>) datetime.datetime(2011, 2, 17, 23, 48, 18, 125000, tzinfo=<UTC>) Traceback (most recent call last): File "<stdin>", line 2, in <module> File "C:\Python27\lib\site-packages\pytz-2011b-py2.7.egg\pytz\__init__.py", li ne 186, in utcoffset KeyboardInterrupt
Simon On Thu, Feb 17, 2011 at 4:58 PM, Tres Seaver <tseaver@palladion.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 02/17/2011 06:58 AM, Zope Tests Summarizer wrote:
Subject: FAILED : Zope Buildbot / zopetoolkit-1.1_win-py2.5 slave-win From: jdriessen at thehealthagency.com Date: Wed Feb 16 15:03:12 EST 2011 URL: http://mail.zope.org/pipermail/zope-tests/2011-February/032218.html
Subject: FAILED : Zope Buildbot / zopetoolkit_win-py2.5 slave-win From: jdriessen at thehealthagency.com Date: Wed Feb 16 15:18:08 EST 2011 URL: http://mail.zope.org/pipermail/zope-tests/2011-February/032223.html
Subject: FAILED : Zope Buildbot / zopetoolkit_win-py2.6 slave-win From: jdriessen at thehealthagency.com Date: Wed Feb 16 15:25:31 EST 2011 URL: http://mail.zope.org/pipermail/zope-tests/2011-February/032226.html
These three failures are due to a quirk in how datetime.datetime repr works: if the 'microseconds' field happens to be zero, it isn't printed, e.g.:
Expected: datetime.datetime(<DATETIME>, tzinfo=<UTC>) Got: datetime.datetime(2011, 2, 16, 20, 0, 43, tzinfo=<UTC>)
The regex (in zope.dublincore.tests.test_timeannotators), expects the microseconds value to be present:
datetime_re = ( '[0-9]{4}, [0-9]{1,2}, [0-9]{1,2}, [0-9]{1,2}, [0-9]{1,2}, \ [0-9]{1,2}, ' '[0-9]{1,6}')
I have no idea why that value is suddenly exactly zero for the THA box.
Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk1dRasACgkQ+gerLs4ltQ4R6ACfTV1r4oXAPee23hIDnA5GEaqQ pX8AoJLVWCq35GWNDCxxqeDmyfezzg9U =Lnxh -----END PGP SIGNATURE-----
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )