ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Greenlee" <>
Subject Getting a relative time from within Ant
Date Wed, 07 Mar 2001 17:17:04 GMT
Hi all,

As part of our automated build process, we're checking out our project
source into a clean directory on our build machine.  We're using CVS to
do this (and the cvs task), and it's working great.  But after reading
Martin Fowler's article on using ant and JUnit for doing continuous
integration testing
(, we've
decided we ought to be building testing the code that was checked in a
little while prior to the start time of the automated build.  That way
no one is in the process of checking in files and screwing up
dependencies when we grab a version to build and test.

What I haven't been able to figure out is how we can get, from within
ant, the time ten minutes ago.  Using <tstamp/> we can get the current
date and time, but that's not what we need -- we're looking for that
time minus ten minutes.  Is there a way to do this?

(For now we're using ${DSTAMP} along with a time passed in on the
command line, but that's not really an elegant solution.)

Thanks in advance,

Chris Greenlee

View raw message