Here you can find the source of getTimezoneList()
public static String[] getTimezoneList()
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.TimeZone; public class Main { public static String[] getTimezoneList() { return TimeZone.getAvailableIDs(); }/*from w ww . ja v a2 s . c o m*/ /** * Get the timezone list for a specific offset from UTC(in hours) * @param hoursOffset * @return */ public static String[] getTimezoneList(int hoursOffset) { ArrayList list = new ArrayList(); list.add(""); String[] s1 = TimeZone.getAvailableIDs(hoursOffset * 3600000); for (int i = 0; i != s1.length; i++) { list.add(s1[i]); } return (String[]) list.toArray(new String[0]); } }