[Zope] ZopeTime().Date() confusion

Dieter Maurer dieter@handshake.de
Mon, 2 Oct 2000 22:39:04 +0200 (CEST)


Larry Albert writes:
 > ....
 > I am using Zope 2.2.1. Every time the method updates, I update the date
 > property called last_updated ....
 
 >   ....  checking last update at least 1 day ago ....

"ZopeTime()" returns a "DateTime.DateTime" object.
Such objects can be substracted giving the difference
in days.

This means, you can use:

	<dtml-call "manage_changeProperties(last_updated=ZopeTime()">

to set "last_updated" and

	<dtml-if "ZopeTime() - last_updated >= 1">

to check that the last update is at least 1 day ago.


Dieter