Here is the test we were using...
import org.joda.time.DateTime;
public class TestDate {
public static void main(String[] args) {
System.out.println("Current date is: " + new DateTime().toString());
}
}
import org.joda.time.DateTime;
public class TestDate {
public static void main(String[] args) {
System.out.println("Current date is: " + new DateTime().toString());
}
}
and the results:
app2: Current date is: 2008-09-11T19:13:19.650Z
app3: Current date is: 2008-09-11T12:13:40.493-07:00
There are several solutions to the problem. Each one has drawbacks. I choose to go with forcing the TZ environment variable when starting up the JVM cause it was the easiest solution.
export TZ=`cat /etc/timezone`
No comments:
Post a Comment