Here you can find the source of getAvailableTimezones()
public static Collection<TimeZone> getAvailableTimezones()
//package com.java2s; //License from project: Open Source License import java.util.Collection; import java.util.Comparator; import java.util.TimeZone; import java.util.TreeSet; public class Main { public static Collection<TimeZone> getAvailableTimezones() { final Collection<TimeZone> tZones = new TreeSet<TimeZone>( new Comparator<TimeZone>() { @Override//from ww w .ja v a 2 s. co m public int compare(TimeZone o1, TimeZone o2) { return o1.getID().compareTo(o2.getID()); } }); for (String id : TimeZone.getAvailableIDs()) { tZones.add(TimeZone.getTimeZone(id)); } return tZones; } }