[Zope] Error?
Tres Seaver
tseaver@palladion.com
Wed, 22 Dec 1999 12:18:57 -0600
"Tom Deprez" <tom.deprez@village.uunet.be> wrote:
> mmm, I don't know if this will help me. The code I showed, is used
> in a ZClass.
>
> I still get this error of : Invalid Date-Time String
>
> How do I have to convert the result of the ZopeTime() function so
> that it can be placed in a property of type 'Date'?
The earlier reply (suggesting manage_changeProperties()) works if you are trying
to set the actual property value from a DTML method. However, I believe this
error comes when trying to marshal a form field, in your case probably defined
as:
<INPUT TYPE="text" NAME="Date:date">
These fields need string representations in them, so that the marshalling code
can convert them to dates when the form is POSTed. If you want to provide a
default or hidden value, try this:
<dtml-let timestamp="ZopeTime().DateTime()">
<INPUT TYPE="text" NAME="Date:date" VALUE="&dtml-timestamp;">
</dtml-let?
Tres.
--
=========================================================
Tres Seaver tseaver@palladion.com 713-523-6582
Palladion Software http://www.palladion.com