Here you can find the source of getCalendar(Date dt, TimeZone to)
public static Calendar getCalendar(Date dt, TimeZone to)
//package com.java2s; /*************************************************************************** * Copyright (c) 2006 Eike Stepper, Fuggerstr. 39, 10777 Berlin, Germany. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * /*from ww w . ja v a2 s . c om*/ * Contributors: * Eike Stepper - initial API and implementation **************************************************************************/ import java.util.Calendar; import java.util.Date; import java.util.TimeZone; public class Main { /** * Get the timezone specific calendar. */ public static Calendar getCalendar(Date dt, TimeZone to) { Calendar cal = Calendar.getInstance(to); cal.setTime(dt); return cal; } }