Calendar.getInstance().getTime() returning date in “GMT” instead of Default TimeZone
问题 Calendar c = Calendar.getInstance(); System.out.println(c.getTime()); c.set(2007, 0, 1); System.out.println(c.getTime()); Output: Tue Sep 12 12:36:24 IST 2017 Mon Jan 01 12:36:24 IST 2007 But, When I use the same code in a different environment, Output changes to below: Output: Tue Sep 12 12:36:24 IST 2017 Mon Jan 01 12:36:24 GMT 2007 FYI, I tried to print the timezone of the calendar instance, before and after setting the values and both are in "IST". I want to know the root cause of this.