[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/DateIndex/tests - test_DateIndex.py:1.4.6.1

Andreas Jung andreas@andreas-jung.com
Sun, 8 Jun 2003 04:52:51 -0400


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/DateIndex/tests
In directory cvs.zope.org:/tmp/cvs-serv2480/lib/python/Products/PluginIndexes/DateIndex/tests

Modified Files:
      Tag: Zope-2_6-branch
	test_DateIndex.py 
Log Message:

      - Collector #928: DateIndex ignored timezones when indexing and
        querying


=== Zope/lib/python/Products/PluginIndexes/DateIndex/tests/test_DateIndex.py 1.4 => 1.4.6.1 ===
--- Zope/lib/python/Products/PluginIndexes/DateIndex/tests/test_DateIndex.py:1.4	Wed Aug 14 18:19:27 2002
+++ Zope/lib/python/Products/PluginIndexes/DateIndex/tests/test_DateIndex.py	Sun Jun  8 04:52:51 2003
@@ -80,7 +80,7 @@
         if type(date) in (FloatType, IntType):
             yr, mo, dy, hr, mn = time.gmtime(date)[:5]
         else:
-            yr, mo, dy, hr, mn = date.parts()[:5]
+            yr, mo, dy, hr, mn = date.toZone('UTC').parts()[:5]
         return (((yr * 12 + mo) * 31 + dy) * 24 + hr) * 60 + mn
 
     def test_empty(self):