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