Here you can find the source of getDateInTimeZone(final Date date, final TimeZone timeZone)
Parameter | Description |
---|---|
date | the date |
timeZone | the timezone |
public static Calendar getDateInTimeZone(final Date date, final TimeZone timeZone)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { /**/* w w w. j a v a 2 s. c om*/ * Get date in timezone * * @param date the date * @param timeZone the timezone * @return a Calendar */ public static Calendar getDateInTimeZone(final Date date, final TimeZone timeZone) { final Calendar calendar = Calendar.getInstance(timeZone); calendar.setTime(date); return calendar; } }