Java TimeZone getAvailableIDs() Example

TimeZone class getAvailableIDs() method example. This example shows you how to use getAvailableIDs() method.


Syntax is : public static String[] getAvailableIDs()
This method returns all the available IDs supported.

Here is the code.
/**
 * @(#) GetAvailableIDsTimeZone.java
 * A class representing use of method getAvailableIDs() of TimeZone class in 
 java.util Package. This is an abstract class.
 * @Version  27-May-2008
 @author   Rose India Team
 */
import java.util.*;

class GetAvailableIDsTimeZone {
    public static void mainString args[] ){
        
    // getAvailableIDs() method call. This is static method.
        String[] avaiId = TimeZone.getAvailableIDs();
    System.out.print("All the available IDs are :");
    for (int i=0; i<avaiId.length; i++)
    {
      System.out.print(avaiId[i", ");
    }       
  }
}

Output of the program.
All the available IDs are :Etc/GMT+12
Etc/GMT+11
MIT
Pacific/Apia
Pacific/Midway
Pacific/Niue
Pacific/Pago_Pago
Pacific/Samoa
US/Samoa
America/Adak
America/Atka
Etc/GMT+10
HST
Pacific/Fakaofo
Pacific/Honolulu
Pacific/Johnston
Pacific/Rarotonga
Pacific/Tahiti
SystemV/HST10
US/Aleutian
US/Hawaii
Pacific/Marquesas
AST
America/Anchorage
America/Juneau
America/Nome
America/Yakutat
Etc/GMT+9
Pacific/Gambier
SystemV/YST9
SystemV/YST9YDT
US/Alaska
America/Dawson

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US