Here you can find the source of getCalendar()
public static Calendar getCalendar()
//package com.java2s; import java.util.Calendar; import java.util.TimeZone; public class Main { /**//from w ww .j ava 2 s. c o m * Get calendar instance with default time zone of GMT+8 * @return Calendar instance */ public static Calendar getCalendar() { TimeZone.setDefault(getDefaultTimeZone()); return Calendar.getInstance(); } /** * Get default time zone of China * @return default time zone */ public static TimeZone getDefaultTimeZone() { return TimeZone.getTimeZone("GMT+8"); } }