ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "W. Sean Hennessy" <shenne...@goldenhourdata.com>
Subject RE: Inserting a date stamp
Date Sat, 02 Aug 2003 01:13:27 GMT
the default for <tstamp> is UTC which is PST+7 these days.
try the offset="-7" attribute to adjust current UTC to PST.

\docs\manual\CoreTasks\tstamp.html

-----Original Message-----
From: sunil singh [mailto:sunil.singh@oracle.com]
Sent: Friday, August 01, 2003 5:50 PM
To: Ant Users List
Subject: Re: Inserting a date stamp


Does anyone know how to set the timezone correctly, for some reason when I
use
tstamp in my build.xml - I see time from a different timezone, even though my
system
is in PST, the time shown by ant is offset by +7 hrs .Wouldn't ant by default
pick the
local timezone of the host machine?

Thanks!
Sunil--

William BC Crandall wrote:

> David and Patrick,
>
> Your suggestions let me get the timestamp I wanted. Thank you both very
> much.
>
> All the best,
>
> William BC Crandall
> bc.crandall@earthlink.net
>
> >
> > ----- Original Message -----
> > From: Patrick Moylan
> > To: bc.crandall@earthlink.net
> > Sent: 01 August 2003 11:39 AM
> > Subject: RE: Inserting a date stamp
> >
> >
> > First I use a property for the timestamp value and format:
> >
> > <tstamp> <format property="buildtime" pattern="MM/dd/yyyy hh:mm:ss
> > aa"/></tstamp>
> >
> > Then I do a token replace:
> >
> > <replace token="$buildtime" value="${buildtime}" file="myfile.xml"/>
> >
> > Inside of myfile.xml is the var:
> >
> > $buildtime
> >
> >
> >
>
> > ----- Original Message -----
> > From: Sills, David
> > To: 'William BC Crandall '
> > Sent: 01 August 2003 8:29 AM
> > Subject: RE: Inserting a date stamp
> >
> >
> > Been a while, but as I recall, it would look like:
> >
> > In your XSL file (to be copied with filtering before use):
> >
> > <xsl:stylesheet version="1.0"
> >                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> >
> >   <xsl:template name="footer">
> >
> >     <div class="boxFooter">
> >       <p>
> >         Last modified: @TODAY@
> >       </p>
> >     </div>
> >
> >   </xsl:template>
> > </xsl:stylesheet>
> >
> > Then, in your build.xml file:
> >
> > <copy ... [name of xml file, destination, etc.]>
> >   <filterset>
> >     <filter token="TODAY" value="${TODAY}"/>
> >   </filterset>
> > </copy>
> >
> > and, of course, "<tstamp/>", probably within your "init" target, to set
> the
> > value of ${TODAY}.
> >
> > Hope this helps.
> >
> > David Sills
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org




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


Mime
View raw message