Here you can find the source of getAsTimeZone(Map params, String propName)
public static TimeZone getAsTimeZone(Map params, String propName)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static TimeZone getAsTimeZone(Map params, String propName) { if (params.containsKey(propName)) { Object timezoneObj = params.get(propName); if (timezoneObj instanceof TimeZone) { return (TimeZone) timezoneObj; } else { return TimeZone.getTimeZone(String.valueOf(timezoneObj)); }/*ww w. j a va2 s .c o m*/ } return null; } }