Ant: Timestamps

You can set the format of a timestamp as follows:

 <tstamp>
  <format pattern="yyyy-MM-dd-HH-mm-ss" property="TIME_STAMP"/>
 </tstamp>

And then echo it as a ${TIME_STAMP}.

The format is the same as Java's.

java-ant java-ant-date java

Edit on github
comments powered by Disqus
Click me