[Zope-Checkins] CVS: Zope/lib/python/DateTime/tests - testDateTime.py:1.4.24.4

Jim Fulton jim@zope.com
Mon, 14 Jan 2002 15:37:46 -0500


Update of /cvs-repository/Zope/lib/python/DateTime/tests
In directory cvs.zope.org:/tmp/cvs-serv29054/tests

Modified Files:
      Tag: Zope-2_5-branch
	testDateTime.py 
Log Message:
Fixed bug in handling numneric time-zone offsets. We need to subtract,
rather than add the offset, since the offset is the offset of the
local time from UT, not the other way around.


=== Zope/lib/python/DateTime/tests/testDateTime.py 1.4.24.3 => 1.4.24.4 ===
         '''Test time-zone given as an offset
         '''
+        from time import gmtime
+
         dt = DateTime('Tue, 24 Jul 2001 09:41:03 -0400')
-        # XXX We are only testing that this works, to exercise
-        # a recent bug, however, we also need to test the value, which is, uh,
-        # controversal.
+        self.assertEqual(gmtime(dt.timeTime())[:6],
+                         (2001,7,24,13,41,3))
 
     def testISO8601(self):
         ''' iso 8601 dates '''