Java TimeZone.getAvailableIDs()

Syntax

TimeZone.getAvailableIDs() has the following syntax.

public static String [] getAvailableIDs()

Example

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


import java.util.TimeZone;
//  w  w w .  j  av a2  s  .  co  m
public class Main {

  public static void main(String[] args) {
   String[] ids = TimeZone.getAvailableIDs();
   for(String id: ids){
     System.out.println(id);
   }

  }
}

The output: