Wrap up a little better to find out what's going on here.
Make sure your instance sets the correct encoding and local system, tomcat container, application. Set to GMT as the standard and try:
Calendar.getInstance ("GMT-0", Locale.US);
If you get a copy of the Calendar, why are you resetting the date explicitly? Why not just create a new calendar? Then you will create a new calendar:
Calendar cal = new Calendar (TimeZone zone, Locale aLocale); // new cal.setTimeZone("GMT-0"); cal.setTimeInMillis(System.currentTimeMillis ());
Calendar and Date objects are relatively flexible in Java, so you can change their functioning. I assume that there might be something inappropriate in the environment variables or the container, such as Local or encoding, that contradict what is being done with the Calendar instance. Try explicitly specifying everything.
This is my best intuition.
source share