Here you can find the source of parseTimeZoneString(String timeZoneString)
public static TimeZone parseTimeZoneString(String timeZoneString)
//package com.java2s; //License from project: Apache License import java.util.TimeZone; public class Main { public static TimeZone parseTimeZoneString(String timeZoneString) { TimeZone timeZone = TimeZone.getTimeZone(timeZoneString); if ("GMT".equals(timeZone.getID()) && !timeZoneString.startsWith("GMT")) { // We don't want that GMT fallback... throw new IllegalArgumentException("Invalid time zone specification '" + timeZoneString + "'"); }//from w w w. jav a 2 s . c o m return timeZone; } }