Here you can find the source of getTimeZone(String id)
public static TimeZone getTimeZone(String id)
//package com.java2s; // modify it under the terms of the GNU General Public License import java.util.TimeZone; public class Main { /**// w w w . j a va2 s . c o m * This method performs the task analogous to TimeZone.getTimeZone(), but * will return null on failure (rather than GMT). */ public static TimeZone getTimeZone(String id) { // if no ID was provided, return null. if (id == null || id.length() == 0) return null; // look up the associated time zone. Note that if the timezone // ID was not recognized, this call will return the GMT time zone. TimeZone result = TimeZone.getTimeZone(id); // if we got GMT back from the getTimeZone call, but our // original timezone ID did not specify GMT, then we should // interpret this as an ID lookup failure. if ("GMT".equals(result.getID()) && !"GMT".equals(id)) return null; return result; } }