When I run this code:
System.out.println( \"XXX date=\" + new Date( 1311781583373L ) );
I get this result in Eclipse\'s JUnit runner:
To specify the default timezone you can set the system property user.timezone. You can do this by passing it as an argument to the JavaVM (you may need to modify eclipse.ini or Maven equivalent config file):
-Duser.timezone=
...or by setting it programmatically:
System.setProperty("user.timezone", "");
Or, if it is convenient you can specify a timezone which you use each time you print out the date:
DateFormat myDateFormat = new SimpleDateFormat("");
myDateFormat.setTimeZone(TimeZone.getTimeZone(""));
....
System.out.println(myDateFormat.format(yourDate));