[Zope] Subtracting DateTimes?????

Ryan M. Dolensek rdolense@globalcrossing.com
Thu, 05 Oct 2000 14:52:34 -0500


Try...

<dtml-if "(ZopeTime()).toZone('US/Central').h_24() == 2 and
(ZopeTime()).toZone('US/Central').minute() >= 45">
  <dtml-comment>Time to show backup warning!</dtml-comment>
</dtml-if>

Daniel Rusch wrote:

> We backup our database every night at 3:00 AM CT. 15 minutes prior to
> this (i.e. 2:45 AM) I would like to display a warning.
> How do I compare the current time <dtml-var
> "(ZopeTime()).toZone('US/Central')"> to 3:00 AM Central Time ?????
>
> <dtml-if "(ZopeTime()).toZone('US/Central') - 0.3"> doesn't work.
>
> Any thoughts???
>
> Dan
>
> _______________________________________________
> 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 )