Get availablve timezone ids

static String[] getAvailableIDs()
Gets all the available IDs supported.
static String[] getAvailableIDs(int rawOffset)
Gets the available IDs according to the given time zone offset in milliseconds.

import java.util.TimeZone;

public class Main {

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

  }
}

The output:


Etc/GMT+12
Etc/GMT+11
MIT
Pacific/Apia
Pacific/Midway
Pacific/Niue
...
...
Pacific/Enderbury
Pacific/Tongatapu
Etc/GMT-14
Pacific/Kiritimati
Home 
  Java Book 
    Essential Classes  

TimeZone:
  1. TimeZone class
  2. Create TimeZone
  3. Get availablve timezone ids
  4. Get display name for a timezone
  5. Get daylight saving
  6. Get timezone id