Here you can find the source of getTimeZoneMap()
public static Map<String, String> getTimeZoneMap()
//package com.java2s; /**/*from w w w .j a v a2 s . com*/ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, version 2.1, dated February 1999. * * This program is free software; you can redistribute it and/or modify * it under the terms of the latest version of the GNU Lesser General * Public License as published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program (LICENSE.txt); if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ import java.util.Map; import java.util.TimeZone; import java.util.TreeMap; public class Main { /** * Returns a list of available time zones. The list is used to get the time zone * of a user in the user preferences dialog. * * @return List of time zones */ public static Map<String, String> getTimeZoneMap() { Map<String, String> timeZoneMap = new TreeMap<String, String>(); for (String timeZoneId : TimeZone.getAvailableIDs()) { timeZoneMap.put(timeZoneId, timeZoneId); } return timeZoneMap; } }