Java TimeZone Get getAsTimeZone(Map params, String propName)

Here you can find the source of getAsTimeZone(Map params, String propName)

Description

get As Time Zone

License

Apache License

Declaration

public static TimeZone getAsTimeZone(Map params, String propName) 

Method Source Code

//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;
    }
}

Related

  1. getAdjustedDateTime(Date dt, TimeZone tz)
  2. getAllTimezonesSorted()
  3. getAvailableTimezones()
  4. getCal(int dayOfMonth, int month, int year, int hours, int minutes, int seconds, String timezone)
  5. getCalendarForTimeZone(final String timeZone)
  6. getCalendarInstance(TimeZone timeZone, Locale locale)