If you dont find a pattern on SimpleDateFormat [1], you could write a custom 
task

<scriptdef name="msec" language="javascript">
    <attribute name="property"/>
    <element name="fileset" type="fileset"/>
    <![CDATA[
        project.setNewProperty(attributes.get("property"), (new 
java.util.Date()).getTime() );
    ]]>
</scriptdef>
<msec property="TIMESTAMP_MILLIS"/>


Jan


[1] http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html  

>-----Ursprüngliche Nachricht-----
>Von: Numain [mailto:[EMAIL PROTECTED] 
>Gesendet: Mittwoch, 29. November 2006 22:06
>An: user@ant.apache.org
>Betreff: Tstamp & co - setting a property with value = 
>milliseconds since 1970
>
>Hi
>
>I've looked at the tstamp ant task, but it does not seem to 
>answer my need.
>
>I'd like to set a property with the milliseconds since 1970 
>(the long value of new Date().getTime()). The Millisecond 
>format does'nt help me since it only sets the millisecond 
>fraction of the current second.
>
>  <tstamp>
>    <format property="TIMESTAMP_MILLIS" pattern="SSSSSSSS" />
>  </tstamp>
>
>Is there an easy way to get this value in ant?
>
>Thanks!
>Numain
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED] For 
>additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to