Here you can find the source of getCalendar(int year, int month, int day, int hour, int min, int sec, String timezone)
public static Calendar getCalendar(int year, int month, int day, int hour, int min, int sec, String timezone)
//package com.java2s; import java.util.Calendar; import java.util.TimeZone; public class Main { public static Calendar getCalendar(int year, int month, int day) { return getCalendar(year, month, day, 0, 0, 0, "GMT"); }//ww w . ja v a 2 s . c om public static Calendar getCalendar(int year, int month, int day, int hour, int min, int sec) { return getCalendar(year, month, day, hour, min, sec, "GMT"); } public static Calendar getCalendar(int year, int month, int day, int hour, int min, int sec, String timezone) { return getCalendar(year, month, day, hour, min, sec, TimeZone.getTimeZone(timezone)); } public static Calendar getCalendar(int year, int month, int day, int hour, int min, int sec, TimeZone timezone) { Calendar calendar = Calendar.getInstance(); calendar.clear(); calendar.set(Calendar.YEAR, year); calendar.set(Calendar.MONTH, month - 1); calendar.set(Calendar.DATE, day); calendar.set(Calendar.HOUR_OF_DAY, hour); calendar.set(Calendar.MINUTE, min); calendar.set(Calendar.SECOND, sec); calendar.setTimeZone(timezone); return calendar; } }