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








Syntax

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

public static String [] getAvailableIDs(int rawOffset)

Example

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++){
         System.out.println(availId[i]);
      } 
   }    
}

The code above generates the following result.