Dennis Allison escreveu:
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')
In all cases, each of the dates shoudl be the same. As can be seen,
for dates sourced from a string of the form
the resulatant date is off by one day
The problem is not seen with Zope 2.6.4 running with
A quick diff shows tht there are many changes between 2.6 and 2.7.
Anyone else seen this problem?
Yes it happes to me also every time I use strftime, so I stopped using it.
Someone posted a patch to fix this in this list not a long ago.
I think this is a problem of interpretation on how the default behavior
should be as these dates do not have any Timezone information.
But I would prefer zope to work the same as python itself, that works as
Luiz Fernando B. Ribeiro
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -