[Zope-dev] zope.sendmail Retry fixes and new state machine.
Fred Drake
fdrake at gmail.com
Mon Mar 10 13:58:11 EDT 2008
On Sun, Mar 9, 2008 at 7:54 PM, Gary Poster <gary at zope.com> wrote:
> I did have one somewhat trivial thought. I generally prefer durations
> and intervals expressed as datetime.timedeltas myself, because they
> convey their meaning without having to look it up docs (is that number
> value a number of seconds? milliseconds? minutes?). There might
> even be a zcml built in for schema field for that; I believe I
> remember that there is in ZConfig.
ZConfig supports two datatypes for time deltas:
"time-interval" is a number of seconds, provided as a float. In a
configuration file, a slightly more readable expression is used. For
example, "4d 3h 2m 1s" means "4 days 3 hours 2 minutes 1 second".
"timedelta" is a datetime.timedelta value. The syntax in the
configuration file is the same as for time-interval.
Neither allows specifying a negative delta value; they're really about
an interval rather than a delta. Fortunately, that covers most
configuration uses.
-Fred
--
Fred L. Drake, Jr. <fdrake at gmail.com>
"Chaos is the score upon which reality is written." --Henry Miller
More information about the Zope-Dev
mailing list