[Checkins] SVN: DateTime/trunk/src/DateTime/tests/testDateTime.py add a failing test for a regression in parsing ISO format datetimes from DateTime 2.10, as discussed at http://dev.plone.org/plone/ticket/10140 ...note that this will give a false positive if run on a computer where GMT is the local timezone

David Glick davidglick at onenw.org
Fri Mar 5 02:04:12 EST 2010


Log message for revision 109667:
  add a failing test for a regression in parsing ISO format datetimes from DateTime 2.10, as discussed at http://dev.plone.org/plone/ticket/10140 ...note that this will give a false positive if run on a computer where GMT is the local timezone

Changed:
  U   DateTime/trunk/src/DateTime/tests/testDateTime.py

-=-
Modified: DateTime/trunk/src/DateTime/tests/testDateTime.py
===================================================================
--- DateTime/trunk/src/DateTime/tests/testDateTime.py	2010-03-05 03:41:57 UTC (rev 109666)
+++ DateTime/trunk/src/DateTime/tests/testDateTime.py	2010-03-05 07:04:12 UTC (rev 109667)
@@ -332,6 +332,7 @@
         ref2 = DateTime('2006/11/6 10:30 GMT')
         ref3 = DateTime('2004/06/14 14:30:15 GMT-3')
         ref4 = DateTime('2006/01/01 GMT')
+        ref5 = DateTime('2006/01/01')
 
         # Basic tests
         # Though this is timezone naive and according to specification should
@@ -428,6 +429,10 @@
         iso8601_string = '2002-05-02T08:00:00-04:00'
         iso8601DT = DateTime(iso8601_string)
         self.assertEqual(iso8601_string, iso8601DT.ISO8601())
+        
+        # ISO format with no timezone
+        isoDt = DateTime('2006-01-01 00:00:00')
+        self.assertEqual(ref5, isoDt)
 
     def testJulianWeek(self):
         # Check JulianDayWeek function



More information about the checkins mailing list