Java Date Time - Java TimeZone.getAvailableIDs(int rawOffset)


TimeZone.getAvailableIDs(int rawOffset) has the following syntax.

public static String [] getAvailableIDs(int rawOffset)


In the following code shows how to use TimeZone.getAvailableIDs(int rawOffset) method.

//w  w  w .j  a v  a  2 s . c  o  m

import java.util.TimeZone;

public class Main {
   public static void main( String args[] ){       
      // getting available Ids for offset
      String[] availId = TimeZone.getAvailableIDs(3600000);      
      // checking available Ids for offset
      System.out.println("Available Ids for offset are: ");
      for (int i=0; i<availId.length; i++){

The code above generates the following result.