[Zope] <dtml-if> and <dtml-var> question

Paul Zwarts paul.zwarts@oratrix.com
Fri, 13 Oct 2000 12:23:53 +0200


Hi there,

I've been having problems with DateTimes as well. My colleague and I (using Zope
201) found a problem with the module that causes any dbase timestamp to be rendered
to a non-standard UNIX time that has an annoying DST appended if in the Daylight
savings time zone, thus leaving the timestamp as useless when performing expressions
against it.

In our situation we used a scan from pos 0-29 to trap the proper timestamp syntax.
Then from there, I use an expression as follows:

   <dtml-elif "list=='LI3'">
      <dtml-call "REQUEST.set('timenow', (_.DateTime() - 30).Date())">
      <dtml-in getMailLIC>
         <dtml-call "REQUEST.set('timethen',
_.DateTime(transaction_date[0:27]).Date())">
         <dtml-if "timethen==timenow">
            <dtml-var buildMailList>
         </dtml-if>
      </dtml-in>
   </dtml-if>

This is just a small part of the code, and im sure there is a better way, but  hey,
it works.

Dont know if this helps you, but perhaps will give you an idea....

Cheers,

--
Paz
Oratrix Development BV
http://www.oratrix.com
GRiNS SMIL Editor
-