Java TimeZone Create getTimeZoneChecked(String id)

Here you can find the source of getTimeZoneChecked(String id)

Description

get Time Zone Checked

License

Open Source License

Declaration

public static TimeZone getTimeZoneChecked(String id) 

Method Source Code

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

Related

  1. getTimeZone(String idParam)
  2. getTimeZone(String timeZone)
  3. getTimeZone(String timeZone)
  4. getTimeZone(String timeZoneId)
  5. getTimezoneAbbreviation(String tzid, boolean dst)
  6. getTimeZoneCorrectedProgramId(String progID)
  7. getTimeZoneDefault()
  8. getTimeZoneIds()
  9. getTimeZoneList()