[Zope] Datetime bug in Zope-2.7.6?
    Dennis Allison 
    allison at shasta.stanford.edu
       
    Sat Jun 11 19:54:03 EDT 2005
    
    
  
Zope 2.7.6
Python 2.4.1 (and yes, I know I am jumping the gun a bit)
The problem appears to be in the parse component -- 
Consider a test script:
for y in range(1995,2005):
    for d in (1, 3, 13, 25,):
        for m in (1,4,5,6,):
             dd = '%d-%02d-%02d' % (y,m,d,)
             ee  = '%d/%d/%d' % (m, d, y)
             D  = DateTime(dd)
             E  = DateTime(ee)
             print dd, D.strftime('%Y-%m-%d')
             print ee, E.strftime('%Y-%m-%d')
return printed
In all cases, each of the dates shoudl be the same.  As can be seen,
for dates sourced from a string of the form
1995-04-25
the resulatant date is off by one day
1995-04-24
The problem is not seen with Zope 2.6.4 running with 
Python 2.3.5.
A quick diff shows tht there are many changes between 2.6 and 2.7.
Anyone else seen this problem?
------------------------------------
Partial Results:
1995-04-25 1995-04-24
4/25/1995 1995-04-25
1995-05-25 1995-05-24
5/25/1995 1995-05-25
1995-06-25 1995-06-24
6/25/1995 1995-06-25
-- 
Dennis Allison * Computer Systems Laboratory * Gates 227
               * Stanford University *  Stanford CA  94305
	       * (650) 723-9213 * (650) 723-0033 fax
	       * allison at shasta.stanford.edu
	       * allison at sumeru.stanford.edu
    
    
More information about the Zope
mailing list