ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sujan Digumarti <>
Subject RE: propertyfile task returning wrong date
Date Fri, 03 May 2002 12:29:59 GMT
  <format property="BUILD_DATE" pattern="yyyyMMd" /> 
change BUILD_DATE to builddate

-----Original Message-----
From: Nolan Ring [mailto:Nolan.Ring@Sun.Com]
Sent: Friday, May 03, 2002 5:57 PM
To: ''
Subject: propertyfile task returning wrong date


The following is a snippet of my build.xml file in which I capture build
number and date in order
to create a build label.  It works great except for the fact that the date
it returns is Jan 1, 1970! :-)

build.xml file:

<propertyfile file="" comment="Date, time and build
number of most recent build"> 
<entry key="buildnum" type="int" default="0000" operation="+" pattern="0000"
<entry key="builddate" type="date" default="now" pattern="yyyyMMdda" /> 
<entry key="buildlabel" value="${builddate}_${buildnum}" /> 
<property file="" /> 
<echo message="Buildlabel is ${buildlabel}" /> 
<echo message="Builddate is ${builddate}" /> 
<echo message="Buildnum is ${buildnum}" /> 

output from ant build:

[propertyfile] Creating new property file:
     [echo] Buildlabel is 19700101AM_0001
     [echo] Builddate is 19700101AM
     [echo] Buildnum is 0001

Just because I was curious, I did the following and it returned the date

Am I missing something??


Nolan Ring

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message