DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=41317>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41317 [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO ------- Additional Comments From [EMAIL PROTECTED] 2007-01-08 09:00 ------- Ant does nothing special, it just uses the JVM. For example: src/ShowTime.java: import java.text.SimpleDateFormat; import java.util.Date; public class ShowTime { public static void main(String[] args) throws Exception { SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd HHmm"); Date d = new Date(); System.out.println("The time is now: " + format.format(d)); } } and build.xml project> <mkdir dir="classes"/> <javac srcdir="src" destdir="classes" debug="yes"/> <java classname="ShowTime" classpath="classes"/> <tstamp/> <echo>The time is now: ${DSTAMP} ${TSTAMP}</echo> </project> Should give the same string. The changes made to the server must have confused the JVM, so it started to use the default time zone - GMT. You can tell the tstamp task to use a specific timezone by having a nested <format> element. <tstamp> <format property="TODAY_CST" pattern="yyyyMMdd HHmm" timezone="CST"/> </tstamp> <echo>The time is now: ${TODAY_CST}</echo> But this is not a general solution. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
