Here you can find the source of getAvailableTimezones()
public synchronized static String[] getAvailableTimezones()
//package com.java2s; //License from project: Open Source License import java.text.DecimalFormat; import java.util.ArrayList; import java.util.TimeZone; public class Main { private static String[] timezones = null; public synchronized static String[] getAvailableTimezones() { if (null == timezones) { DecimalFormat df = new DecimalFormat("'GMT'+00':00';'GMT'-00':00'"); ArrayList<String> tzs = new ArrayList<String>(29); tzs.add("UTC"); tzs.add("GMT"); tzs.add(TimeZone.getDefault().getID()); for (int i = -12; i < 15; i++) { tzs.add(df.format(i));/* ww w . j a va 2 s . co m*/ } timezones = tzs.toArray(new String[tzs.size()]); } return timezones; } }