[Zope] Calculations on a Date Field

complaw@hal-pc.org complaw@hal-pc.org
Fri, 10 May 2002 17:53:54 GMT


> 
> Use DateTime()

Thanks for your suggestion, but it didn't work.  I tried:

<dtml-let old_date=DateTime(date_posted)
new_date="old_date - 0.25">

</dtml-let>

And again, the server returned an error, although this time for the DateTime
issue.

Any other suggestions?

Ron

> 
> It has all kinds of options you can use to offset and perform calculations 
> on time objects.
> 
> -ed-
> 
> On Fri, 10 May 2002 complaw@hal-pc.org wrote:
> 
> > My users are annoyed with the time shift of postings on a Squishdot site. 
The
> > users are in the U.S. and the server is in the Netherlands (FreeZope.org, a
> > truly wonderful thing).  The DTML code in Squishdot that displays the date
> > appears to be a date field in the posting object.  E.g., the code is:
> > 
> > <dtml-var date_posted>
> > 
> > What I want to do is recalculate the date_posted and shift the time back
about
> > five hours.  
> > 
> > I tried:
> > 
> > <dtml-let old_date=date_posted
> > 
> > new_date="old_date - 0.25">
> > <dtml-var new_date>
> > </dtml-let>
> > 
> > But the server returned an error regarding the use of the minus sign.  Does
> > anyone have any hints?
> > 
> > Thanks in advance,
> > 
> > Ron
> > 
> > 
> > 
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists - 
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> > 
> 
> -- 
> Green Graphics   :::   Print and Web Design   :::   510.923.0000 
>