You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Guofeng Zhang <gu...@visionnex.com> on 2003/12/30 04:21:14 UTC

How to get the current time?

I want to store the current time in jar's MANIFEST.MF. but I can not know how to get it in the ant.

The following is what I know, but it won't work. It always display '{touch.time}', not the date.

  <tstamp prefix="start">
      <format property="touch.time" pattern="MM/dd/yyyy hh:mm aa" />
  </tstamp>

<echo message="{touch.time}" />


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: How to get the current time?

Posted by Markku Saarela <ma...@entra.fi>.
Hi,
you put prefix to tstamp so this echo task should be:

<echo message="${start.touch.time}" />

rgds, Markku

Guofeng Zhang wrote:

>I want to store the current time in jar's MANIFEST.MF. but I can not know how to get it in the ant.
>
>The following is what I know, but it won't work. It always display '{touch.time}', not the date.
>
>  <tstamp prefix="start">
>      <format property="touch.time" pattern="MM/dd/yyyy hh:mm aa" />
>  </tstamp>
>
><echo message="{touch.time}" />
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>  
>


-- 
Markku Saarela
Senior Software Engineer (OO Technology, Java, J2EE, Smalltalk)
Entra e-Solutions Oy
mobile: +358-9-590 6505
markku.saarela@entra.fi
www.entra.fi


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org