[Zope] Problem with date

Dieter Maurer dieter@handshake.de
Fri, 23 Jun 2000 23:58:27 +0200 (CEST)


"Vikas Mahajan" <> writes:
 > Now my problem is to insert a date type in the properties of folder. The formats like Jan. 07, 2000    January 07 2000 jan 07 2000 2000/07/01 all work well in the version 1.2.2 which is a binary release. But, none of the format works with the version 1.2.6 which i had downloaded as source. The error i am getting with the date type data is as follows.
 > 
 > 
 >           Error Type: Invalid Date-Time String
 >           Error Value: january 20, 2000 
You problem may be caused by trailing whitespace.


lindm: python
Python 1.5.2 (#9, Aug  5 1999, 20:32:28)  [GCC egcs-2.91.60 19981201 (egcs-1.1.1  on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import DateTime
>>> D=DateTime.DateTime
>>> D('january 20, 2000')
DateTime('2000/01/20')
>>> D('january 20, 2000 ')
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "DateTime.py", line 520, in __init__
  File "DateTime.py", line 790, in _parse
Invalid Date-Time String: january 20, 2000 



Dieter