Here you can find the source of getCurrentTimeZoneCalendar(String timeZone)
Parameter | Description |
---|---|
timeZone | the time zone |
public static Calendar getCurrentTimeZoneCalendar(String timeZone)
//package com.java2s; /*// w ww .j ava2 s . c o m * DateUtil.java * Copyright (c) 2014, EcoFactor, All Rights Reserved. * * This software is the confidential and proprietary information of EcoFactor * ("Confidential Information"). You shall not disclose such Confidential Information and shall use * it only in accordance with the terms of the license agreement you entered into with * EcoFactor. */ import java.util.Calendar; import java.util.TimeZone; public class Main { /** * Gets the current time zone calendar. * @param timeZone the time zone * @return the current time zone calendar */ public static Calendar getCurrentTimeZoneCalendar(String timeZone) { Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone(timeZone)); return calendar; } }