Here you can find the source of getTimeZoneChecked(String id)
public static TimeZone getTimeZoneChecked(String id)
//package com.java2s; import java.util.TimeZone; public class Main { public static TimeZone getTimeZoneChecked(String id) { TimeZone tz = TimeZone.getTimeZone(id); if (!tz.getID().equals(id)) { throw new IllegalArgumentException("illegal timezone id " + id); }/*from w w w .j a v a2s . c o m*/ return tz; } }