Oliver Frommel wrote:
> hello,
> I have a ZClass called "thema" with some date properties to change creation/
> modification dates independent of bobobase_modification_time. So I try to
> set one date property called "date1" equal to the current time of creation:
>   <dtml-with "manage_addProduct['RadioObjects']">
>    <dtml-with "thema.createInObjectManager(ZopeTime().strftime('%Y%m%d%H%M%S'), 
>      <dtml-call "REQUEST.set('date1', ZopeTime())">
>      <dtml-call "propertysheets.prop.manage_editProperties(REQUEST)">
>    </dtml-with>
>   </dtml-with>
>  </dtml-with>
> Unfortunately I am getting an "Invalid Date-Time String" error when
> calling the manage_editProperties. I tried some possible solutions from the
> mailing lists but failed so far, e.g. using ZopeTime or ZopeTime().DateTime()
> Any help?

 it sounds like the property date is meant to be a string conforming to
the syntax that a Date Time Object can take and Zope does the conversion
when the property is used. the code above tries to place an actual date
time object in the propertysheet which wants a string which it can
covert. try

<dtml-let x="ZopeTime().strftime('InsertYourFormat')">
<dtml-call REQUEST.set('date1', x)
<dtml-call "propertysheets.prop.manage_editProperties(REQUEST)">

I hope that helps.



Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to