[Zope] Problem with date in Zope 2.5.0

Josef Meile jmeile@hotmail.com
Sat, 20 Apr 2002 23:17:14 +0200


Why does this line works in Zope 2.3.3 - win2K but not in Zope 2.5.0 -
win2K?

  <dtml-call "REQUEST.set('startDate',_.DateTime('1970/01/01'))">

I just get the following error:

Error Type: IOError
Error Value: [Errno 22] Invalid argument
Traceback (innermost last):
  File C:\PROGRA~2\ZOPE-2~1.0\lib\python\ZPublisher\Publish.py, line 150, in
publish_module
  File C:\PROGRA~2\ZOPE-2~1.0\lib\python\ZPublisher\Publish.py, line 114, in
publish
  File C:\PROGRA~2\ZOPE-2~1.0\lib\python\Zope\__init__.py, line 158, in
zpublisher_exception_hook
    (Object: Zope)
  File C:\PROGRA~2\ZOPE-2~1.0\lib\python\ZPublisher\Publish.py, line 98, in
publish
  File C:\PROGRA~2\ZOPE-2~1.0\lib\python\ZPublisher\mapply.py, line 88, in
mapply
    (Object: test2)
  File C:\PROGRA~2\ZOPE-2~1.0\lib\python\ZPublisher\Publish.py, line 39, in
call_object
    (Object: test2)
  File C:\PROGRA~2\ZOPE-2~1.0\lib\python\OFS\DTMLMethod.py, line 127, in
__call__
    (Object: test2)
  File C:\PROGRA~2\ZOPE-2~1.0\lib\python\DocumentTemplate\DT_String.py, line
473, in __call__
    (Object: test2)
  File C:\PROGRA~2\ZOPE-2~1.0\lib\python\DocumentTemplate\DT_Util.py, line
159, in eval
    (Object: REQUEST.set('startDate',_.DateTime('1970/01/01')))
    (Info: REQUEST)
  File <string>, line 2, in f
  File C:\PROGRA~2\ZOPE-2~1.0\lib\python\DateTime\DateTime.py, line 642, in
__init__
  File C:\PROGRA~2\ZOPE-2~1.0\lib\python\DateTime\DateTime.py, line 1014, in
_parse
  File C:\PROGRA~2\ZOPE-2~1.0\lib\python\DateTime\DateTime.py, line 833, in
_calcTimezoneName
  File C:\PROGRA~2\ZOPE-2~1.0\lib\python\DateTime\DateTime.py, line 395, in
safelocaltime
IOError: (see above)

I could solve this problem by replacing 1970 for 1980. But imaging what
would
happen if I implement a functionality to search persons who were born on
that date.

Thanks in advanced,
Josef.