Get all the time zones IDs in Java

Description

The following code shows how to get all the time zones IDs.

Example


/*  w ww. j av a  2 s.c o m*/
import java.util.TimeZone;

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

The code above generates the following result.





















Home »
  Java Tutorial »
    Date »




Date Get
Date Set
Date Format
Date Compare
Date Convert
Date Calculation
Date Parse
Timezone