[Zope] Can't add "date" property to new ZClass

Loren Stafford lstafford@icompression.com
Mon, 11 Oct 1999 15:06:50 -0700


I'm creating a brand new ZClass (called "PDFClass"). It's my first ZClass.
I've just added the Common Instance Property Sheet (called "PDFProperties").
Now I'm trying to add properties to that property sheet. I added one
"string" property OK, but now when I add the "date" property "pub_date", I
get this error:

          Zope Error
          Zope has encountered an error while publishing this resource.
          Invalid Date-Time String
          Sorry, a Zope error occurred.

Traceback (innermost last):
  File /opt/Zope-2.0.0/lib/python/ZPublisher/Publish.py, line 214, in
publish_module
  File /opt/Zope-2.0.0/lib/python/ZPublisher/Publish.py, line 179, in
publish
  File /opt/Zope-2.0.0/lib/python/Zope/__init__.py, line 201, in
zpublisher_exception_hook
    (Object: PDFProperties)
  File /opt/Zope-2.0.0/lib/python/ZPublisher/Publish.py, line 165, in
publish
  File /opt/Zope-2.0.0/lib/python/ZPublisher/mapply.py, line 160, in mapply
    (Object: manage_addProperty)
  File /opt/Zope-2.0.0/lib/python/ZPublisher/Publish.py, line 102, in
call_object
    (Object: manage_addProperty)
  File /opt/Zope-2.0.0/lib/python/OFS/PropertySheets.py, line 403, in
manage_addProperty
    (Object: PDFProperties)
  File /opt/Zope-2.0.0/lib/python/ZPublisher/Converters.py, line 157, in
field2date
  File /opt/Zope-2.0.0/lib/python/DateTime/DateTime.py, line 499, in
__init__
Invalid Date-Time String: Sorry, an error occurred

Of course, the value is invalid -- I didn't put any value in the "Value"
box, because this is a class property, and values only make sense when the
class is instantiated, right?

Is this Zope's problem or mine?

-- Thanks
-- Loren