Here you can find the source of getTimeZone(final String tzId)
Parameter | Description |
---|---|
tzId | the tz id |
public static TimeZone getTimeZone(final String tzId)
//package com.java2s; import java.util.TimeZone; public class Main { /**/*from w w w. j a v a 2s . c o m*/ * Gets the time zone. * * @param tzId * the tz id * @return the time zone */ public static TimeZone getTimeZone(final String tzId) { if (tzId == null) { throw new IllegalArgumentException("getTimeZone"); } TimeZone tz = TimeZone.getTimeZone(tzId); if (!tz.getID().equals(tzId)) { throw new IllegalArgumentException("getTimeZone"); } return tz; } }