ant - tstamp with absolute timezone not relative

C

coltrane

how can I get a time stamp for a particular time zone.
I do not want to use offset because that will only give me a tz
relative to the tz of my build machine.

thanks

john
 
R

Roedy Green

how can I get a time stamp for a particular time zone.
I do not want to use offset because that will only give me a tz
relative to the tz of my build machine.

timestamps e.g. currentTimeMillis are always GMT.
 
C

coltrane

yes, it refered me to the the timezone class in the java api. That only
allows to set using an offset or an ID which is not defined.
 
J

jlowery05

<project>

<target name="all">
<tstamp>
<format property="ababadabadadoo" pattern="MM/dd/yyyy hh:mm aa"
timezone="Africa/Addis_Ababa"/>
</tstamp>

<echo>${ababadabadadoo}</echo>
</target>

</project>


The ids are defined in the java.util.TimeZone class and get be had by
calling the method getAvailableIDs(), which will return a whole slew of
them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top