home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / util / TimeZone.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  81.7 KB  |  1,321 lines

  1. /*
  2.  * @(#)TimeZone.java    1.24 98/03/18
  3.  *
  4.  * (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
  5.  * (C) Copyright IBM Corp. 1996 - All Rights Reserved
  6.  *
  7.  * Portions copyright (c) 1996-1998 Sun Microsystems, Inc. All Rights Reserved.
  8.  *
  9.  *   The original version of this source code and documentation is copyrighted
  10.  * and owned by Taligent, Inc., a wholly-owned subsidiary of IBM. These
  11.  * materials are provided under terms of a License Agreement between Taligent
  12.  * and Sun. This technology is protected by multiple US and International
  13.  * patents. This notice and attribution to Taligent may not be removed.
  14.  *   Taligent is a registered trademark of Taligent, Inc.
  15.  *
  16.  * Permission to use, copy, modify, and distribute this software
  17.  * and its documentation for NON-COMMERCIAL purposes and without
  18.  * fee is hereby granted provided that this copyright notice
  19.  * appears in all copies. Please refer to the file "copyright.html"
  20.  * for further important copyright and licensing information.
  21.  *
  22.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
  23.  * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
  24.  * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  25.  * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
  26.  * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
  27.  * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
  28.  *
  29.  */
  30.  
  31. package java.util;
  32. import java.io.Serializable;
  33.  
  34. /**
  35.  * <code>TimeZone</code> represents a time zone offset, and also figures out daylight
  36.  * savings.
  37.  *
  38.  * <p>
  39.  * Typically, you get a <code>TimeZone</code> using <code>getDefault</code>
  40.  * which creates a <code>TimeZone</code> based on the time zone where the program
  41.  * is running. For example, for a program running in Japan, <code>getDefault</code>
  42.  * creates a <code>TimeZone</code> object based on Japanese Standard Time.
  43.  *
  44.  * <p>
  45.  * You can also get a <code>TimeZone</code> using <code>getTimeZone</code> along
  46.  * with a time zone ID. For instance, the time zone ID for the Pacific
  47.  * Standard Time zone is "PST". So, you can get a PST <code>TimeZone</code> object
  48.  * with:
  49.  * <blockquote>
  50.  * <pre>
  51.  * TimeZone tz = TimeZone.getTimeZone("PST");
  52.  * </pre>
  53.  * </blockquote>
  54.  * You can use <code>getAvailableIDs</code> method to iterate through
  55.  * all the supported time zone IDs. You can then choose a
  56.  * supported ID to get a favorite <code>TimeZone</code>.
  57.  *
  58.  * @see          Calendar
  59.  * @see          GregorianCalendar
  60.  * @see          SimpleTimeZone
  61.  * @version      1.21 01/15/98
  62.  * @author       Mark Davis, David Goldsmith, Chen-Lieh Huang, Alan Liu
  63.  */
  64. abstract public class TimeZone implements Serializable, Cloneable {
  65.  
  66.     /**
  67.      * Gets the time zone offset, for current date, modified in case of
  68.      * daylight savings. This is the offset to add *to* UTC to get local time.
  69.      * @param era the era of the given date.
  70.      * @param year the year in the given date.
  71.      * @param month the month in the given date.
  72.      * Month is 0-based. e.g., 0 for January.
  73.      * @param day the day-in-month of the given date.
  74.      * @param dayOfWeek the day-of-week of the given date.
  75.      * @param milliseconds the millis in day in <em>standard</em> local time.
  76.      * @return the offset to add *to* GMT to get local time.
  77.      */
  78.     abstract public int getOffset(int era, int year, int month, int day,
  79.                                   int dayOfWeek, int milliseconds);
  80.  
  81.     /**
  82.      * Sets the base time zone offset to GMT.
  83.      * This is the offset to add *to* UTC to get local time.
  84.      * @param offsetMillis the given base time zone offset to GMT.
  85.      */
  86.     abstract public void setRawOffset(int offsetMillis);
  87.  
  88.     /**
  89.      * Gets unmodified offset, NOT modified in case of daylight savings.
  90.      * This is the offset to add *to* UTC to get local time.
  91.      * @return the unmodified offset to add *to* UTC to get local time.
  92.      */
  93.     abstract public int getRawOffset();
  94.  
  95.     /**
  96.      * Gets the ID of this time zone.
  97.      * @return the ID of this time zone.
  98.      */
  99.     public String getID()
  100.     {
  101.         return ID;
  102.     }
  103.  
  104.     /**
  105.      * Sets the time zone ID. This does not change any other data in
  106.      * the time zone object.
  107.      * @param ID the new time zone ID.
  108.      */
  109.     public void setID(String ID)
  110.     {
  111.         this.ID = ID;
  112.     }
  113.  
  114.     /**
  115.      * Queries if this time zone uses Daylight Savings Time.
  116.      * @return true if this time zone uses Daylight Savings Time,
  117.      * false, otherwise.
  118.      */
  119.     abstract public boolean useDaylightTime();
  120.  
  121.     /**
  122.      * Queries if the given date is in Daylight Savings Time in
  123.      * this time zone.
  124.      * @param date the given Date.
  125.      * @return true if the given date is in Daylight Savings Time,
  126.      * false, otherwise.
  127.      */
  128.     abstract public boolean inDaylightTime(Date date);
  129.  
  130.     /**
  131.      * Gets the TimeZone for the given ID.
  132.      * @param ID the given ID.
  133.      * @return a TimeZone, or null if the given ID is not recognized.
  134.      */
  135.     public static synchronized TimeZone getTimeZone(String ID)
  136.     {
  137.         // Don't allow long IDs yet
  138.         TimeZone zone = (ID.length() <= 3) ? TimeZoneData.get(ID) : null;
  139.         return zone != null ? zone : TimeZoneData.get(DEFAULT_SHORT_ID);
  140.     }
  141.  
  142.     /**
  143.      * Gets the available IDs according to the given time zone offset.
  144.      * @param rawOffset the given time zone GMT offset.
  145.      * @return an array of IDs, where the time zone for that ID has
  146.      * the specified GMT offset. For example, "America/Phoenix" and "America/Denver"
  147.      * both have GMT-07:00, but differ in daylight savings behavior.
  148.      */
  149.     public static synchronized String[] getAvailableIDs(int rawOffset) {
  150.         String[]    resultArray = new String[TimeZoneData.MAXIMUM_ZONES_PER_OFFSET];
  151.         int         count = 0;
  152.         for (int i = 0; i < TimeZoneData.zones.length; ++i) {
  153.             if (rawOffset == TimeZoneData.zones[i].getRawOffset() &&
  154.                 TimeZoneData.zones[i].getID().length() <= 3) // Hide long IDs
  155.                 resultArray[count++] = TimeZoneData.zones[i].getID();
  156.         }
  157.  
  158.         // copy into array of the right size and return
  159.         String[] finalResult = new String[count];
  160.         System.arraycopy(resultArray, 0, finalResult, 0, count);
  161.  
  162.         return finalResult;
  163.     }
  164.  
  165.     /**
  166.      * Gets all the available IDs supported.
  167.      * @return an array of IDs.
  168.      */
  169.     public static synchronized String[] getAvailableIDs() {
  170.         String[]    resultArray = new String[TimeZoneData.zones.length];
  171.         int         count = 0;
  172.         for (int i = 0; i < TimeZoneData.zones.length; ++i)
  173.             if (TimeZoneData.zones[i].getID().length() <= 3) // Hide long IDs
  174.                 resultArray[count++] = TimeZoneData.zones[i].getID();
  175.  
  176.         // copy into array of the right size and return
  177.         String[] finalResult = new String[count];
  178.         System.arraycopy(resultArray, 0, finalResult, 0, count);
  179.  
  180.         return finalResult;
  181.     }
  182.     
  183.     /**
  184.      * Gets the default TimeZone for this host.
  185.      * @return a default TimeZone.
  186.      */
  187.     public static synchronized TimeZone getDefault() {
  188.         if (defaultZone == null) {
  189.             // get the ID from the system properties, and translate the
  190.             // 3-letter code to a full TimeZone id.
  191.             String ID = null;
  192.             try {
  193.         java.security.AccessController.beginPrivileged();
  194.         ID = System.getProperty("user.timezone", "GMT");
  195.         } finally {
  196.         java.security.AccessController.endPrivileged();
  197.         }
  198.             if (ID != null) {
  199.                 defaultZone = getTimeZone(ID);
  200.                 if (defaultZone != null)
  201.                     return defaultZone;
  202.             }
  203.  
  204.             // There used to be code here that pretended to get a time zone
  205.             // for the host's system's offset, but since we don't have the
  206.         }
  207.         return (TimeZone)defaultZone.clone();
  208.     }
  209.  
  210.     /**
  211.      * Sets time zone to using the given TimeZone.
  212.      * @param zone the given time zone.
  213.      */
  214.     public static synchronized void setDefault(TimeZone zone)
  215.     {
  216.         defaultZone = zone;
  217.     }
  218.  
  219.     /**
  220.      * Overrides Cloneable
  221.      */
  222.     public Object clone()
  223.     {
  224.         try {
  225.             TimeZone other = (TimeZone) super.clone();
  226.             other.ID = ID;
  227.             return other;
  228.         } catch (CloneNotSupportedException e) {
  229.             throw new InternalError();
  230.         }
  231.     }
  232.  
  233.     // =======================privates===============================
  234.  
  235.     private String           ID;
  236.     private static TimeZone  defaultZone = null;
  237.  
  238.     // These are the default IDs for timezones; we use these if we can't get
  239.     // the host timezone data, or if we don't recognize it.
  240.     private static final String DEFAULT_SHORT_ID = "GMT";
  241.     private static final String DEFAULT_ID       = "Africa/Casablanca";
  242.  
  243.     /**
  244.      * This array maps from the user.timezone 3-letter ID to a usable
  245.      * TimeZone ID.
  246.      */
  247.     private static final String[] idMap =
  248.     {
  249.         // Windows name               user.timezone ID   TimeZone ID
  250.         // ------------               ----------------   -----------
  251.         /* "GMT Standard Time",              */  "GMT",  "Africa/Casablanca",
  252.         /* "Romance Standard Time",          */  "ECT",  "Europe/Paris",
  253.         /* "Egypt Standard Time",            */  "EET",  "Africa/Cairo",
  254.         /* "Saudi Arabia Standard Time",     */  "EAT",  "Asia/Riyadh",
  255.         /* "Iran Standard Time",             */  "MET",  "Asia/Tehran",
  256.         /* "Arabian Standard Time",          */  "NET",  "Asia/Yerevan",
  257.         /* "West Asia Standard Time",        */  "PLT",  "Asia/Karachi",
  258.         /* "India Standard Time",            */  "IST",  "Asia/Calcutta",
  259.         /* "Central Asia Standard Time",     */  "BST",  "Asia/Dacca",
  260.         /* "Bangkok Standard Time",          */  "VST",  "Asia/Bangkok",
  261.         /* "China Standard Time",            */  "CTT",  "Asia/Shanghai",
  262.         /* "Tokyo Standard Time",            */  "JST",  "Asia/Tokyo",
  263.         /* "Cen. Australia Standard Time",   */  "ACT",  "Australia/Adelaide",
  264.         /* "Sydney Standard Time",           */  "AET",  "Australia/Sydney",
  265.         /* "Central Pacific Standard Time",  */  "SST",  "Pacific/Guadalcanal",
  266.         /* "New Zealand Standard Time",      */  "NST",  "Pacific/Auckland",
  267.         /* "Samoa Standard Time",            */  "MIT",  "Pacific/Apia",
  268.         /* "Hawaiian Standard Time",         */  "HST",  "Pacific/Honolulu",
  269.         /* "Alaskan Standard Time",          */  "AST",  "America/Anchorage",
  270.         /* "Pacific Standard Time",          */  "PST",  "America/Los_Angeles",
  271.         /* "US Mountain Standard Time",      */  "MST",  "America/Denver",
  272.         /* "Central Standard Time",          */  "CST",  "America/Chicago",
  273.         /* "Eastern Standard Time",          */  "EST",  "America/New_York",
  274.         /* "Atlantic Standard Time",         */  "PRT",  "America/Halifax",
  275.         /* "Newfoundland Standard Time",     */  "CNT",  "America/St_Johns",
  276.         /* "SA Eastern Standard Time",       */  "AGT",  "America/Buenos_Aires",
  277.         /* "E. South America Standard Time", */  "BET",  "America/Sao_Paulo",
  278.         /* "Azores Standard Time",           */  "CAT",  "Atlantic/Azores",
  279.     };
  280.  
  281.     private static Hashtable idlookup = new Hashtable(idMap.length / 2);
  282.  
  283.     static {
  284.         for (int i=0; i<idMap.length; i+=2)
  285.         {
  286.             if (false)
  287.             {
  288.                 // Debugging code
  289.                 if (TimeZoneData.get(idMap[i+1]) == null)
  290.                     System.out.println("*** Bad TimeZone.idMap at " + i);
  291.                 if (idlookup.get(idMap[i]) != null)
  292.                     System.out.println("*** Duplicate idMap " + idMap[i]);
  293.             }
  294.             idlookup.put(idMap[i], idMap[i+1]);
  295.         }
  296.     }
  297.  
  298.     // Internal Implementation Notes [LIU]
  299.     //
  300.     // TimeZone data is stored in two parts.  The first is an encoding of the
  301.     // rules for each TimeZone.  A TimeZone rule includes the offset of a zone
  302.     // in milliseconds from GMT, the starting month and day for daylight savings
  303.     // time, if there is any, and the ending month and day for daylight savings
  304.     // time.  The starting and ending days are specified in terms of the n-th
  305.     // day of the week, for instance, the first Sunday or the last ("-1"-th)
  306.     // Sunday of the month.  The rules are stored as statically-constructed
  307.     // SimpleTimeZone objects in the TimeZone class.
  308.     //
  309.     // Each rule has a unique internal identifier string which is used to
  310.     // specify it.  This identifier string is arbitrary, and is not to be shown
  311.     // to the user -- it is for programmatic use only.  In order to instantiate
  312.     // a TimeZone object, you pass its identifier string to
  313.     // TimeZone.getTimeZone().  (This identifier is also used to index the
  314.     // localized string data.)
  315.     //
  316.     // The second part of the data consists of localized string names used by
  317.     // DateFormat to describe various TimeZones.  A TimeZone may have up to four
  318.     // names: The abbreviated and long name for standard time in that zone, and
  319.     // the abbreviated and long name for daylight savings time in that zone.
  320.     // The data also includes a representative city.  For example, [ "PST",
  321.     // "Pacific Standard Time", "PDT", "Pacific Daylight Time", "Los Angeles" ]
  322.     // might be one such set of string names in the en_US locale.  These strings
  323.     // are intended to be shown to the user.  The string data is indexed in the
  324.     // system by a pair (String id, Locale locale).  The id is the unique string
  325.     // identifier for the rule for the given TimeZone (as passed to
  326.     // TimeZone.getTimeZone()).  String names are stored as localized resource
  327.     // data of the class java.text.resources.DateFormatZoneData???  where ??? is
  328.     // the Locale specifier (e.g., DateFormatZoneData_en_US).  This data is a
  329.     // two-dimensional array of strings with N rows and 6 columns.  The columns
  330.     // are id, short standard name, long standard name, short daylight name,
  331.     // long daylight name, representative city name.
  332.     //
  333.     // The mapping between rules (SimpleTimeZone objects) and localized string
  334.     // names (DateFormatZoneData objects) is one-to-many.  That is, there will
  335.     // sometimes be more than one localized string name sets associated with
  336.     // each rule.
  337.     //
  338.     // Each locale can potentially have localized name data for all time zones.
  339.     // Since we support approximately 90 time zones and approximately 50
  340.     // locales, there can be over 4500 sets of localized names.  In practice,
  341.     // only a fraction of these names are provided.  If a time zone needs to be
  342.     // displayed to the user in a given locale, and there is no string data in
  343.     // that locale for that time zone, then the default representation will be
  344.     // shown.  This is a string of the form GMT+HHMM or GMT-HHMM, where HHMM
  345.     // represents the offset in hours and minutes with respect to GMT.  This
  346.     // format is used because it is recognized in all locales.  In order to make
  347.     // this mechanism to work, the root resource data (in the class
  348.     // DateFormatZoneData) is left empty.
  349.     //
  350.     // The current default TimeZone is determined via the system property
  351.     // user.timezone.  This is set by the platform-dependent native code to
  352.     // a three-letter abbreviation.  We interpret these into our own internal
  353.     // IDs using a lookup table.
  354. }
  355.  
  356. /**
  357.  * Encapsulates data for international timezones.  This package-private class is for
  358.  * internal use only by TimeZone.  It encapsulates the list of recognized international
  359.  * timezones.  By implementing this as a separate class, the loading and initialization
  360.  * cost for this array is delayed until a TimeZone object is actually created from its ID.
  361.  * This class contains only static variables and static methods; it cannot be instantiated.
  362.  */
  363. class TimeZoneData
  364. {
  365.     // The following value must be set to the maximum number of zones sharing
  366.     // a single base offset value.
  367.     static final int MAXIMUM_ZONES_PER_OFFSET = 13;
  368.  
  369.     static final TimeZone get(String ID)
  370.     {
  371.         Object o = lookup.get(ID);
  372.         return o == null ? null : (TimeZone)((TimeZone)o).clone(); // [sic]
  373.     }
  374.  
  375.     private static final int millisPerHour = 60*60*1000;
  376.  
  377.     static SimpleTimeZone[] zones =
  378.     {
  379.         // The following data is current as of 1997
  380.         //----------------------------------------------------------
  381.         new SimpleTimeZone(-11 * millisPerHour, "Pacific/Apia" /*WST*/),
  382.         // Pacific/Apia W Samoa -11:00  -       WST     # W Samoa Time
  383.         // Pacific/Midway       ?       -11:00  -       SST     # S=Samoa
  384.         // Pacific/Niue Niue    -11:00  -       NUT
  385.         // Pacific/Pago_Pago    American Samoa  -11:00  -       SST     # S=Samoa
  386.         //----------------------------------------------------------
  387.         new SimpleTimeZone(-10 * millisPerHour, "Pacific/Honolulu" /*HST*/),
  388.         // Pacific/Honolulu     Hawaii  -10:00  -       HST
  389.         // Pacific/Fakaofo      Tokelau Is      -10:00  -       TKT     # Tokelau Time
  390.         // Pacific/Johnston     Johnston        -10:00  -       HST
  391.         // Pacific/Tahiti       French Polynesia        -10:00  -       TAHT    # Tahiti Time
  392.         //----------------------------------------------------------
  393. //        new SimpleTimeZone(-10 * millisPerHour, "America/Adak" /*HA%sT*/,
  394. //                Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  395. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  396.         // Rule US      1967    max     -       Oct     lastSun 2:00    0       S
  397.         // Rule US      1987    max     -       Apr     Sun>=1  2:00    1:00    D
  398.         // America/Adak Alaska  -10:00  US      HA%sT
  399.         //----------------------------------------------------------
  400. //        new SimpleTimeZone(-10 * millisPerHour, "Pacific/Rarotonga" /*CK%sT*/,
  401. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour,
  402. //                Calendar.MARCH, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour, (int)(0.5 * millisPerHour)),
  403.         // Rule Cook    1979    max     -       Mar     Sun>=1  0:00    0       -
  404.         // Rule Cook    1979    max     -       Oct     lastSun 0:00    0:30    HS
  405.         // Pacific/Rarotonga    Cook Is -10:00  Cook    CK%sT
  406.         //----------------------------------------------------------
  407. //        new SimpleTimeZone((int)(-9.5 * millisPerHour), "Pacific/Marquesas" /*MART*/),
  408.         // Pacific/Marquesas    French Polynesia        -9:30   -       MART    # Marquesas Time
  409.         //----------------------------------------------------------
  410. //        new SimpleTimeZone(-9 * millisPerHour, "Pacific/Gambier" /*GAMT*/),
  411.         // Pacific/Gambier      French Polynesia        -9:00   -       GAMT    # Gambier Time
  412.         //----------------------------------------------------------
  413.         new SimpleTimeZone(-9 * millisPerHour, "America/Anchorage" /*AK%sT*/,
  414.                 Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  415.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  416.         // Rule US      1967    max     -       Oct     lastSun 2:00    0       S
  417.         // Rule US      1987    max     -       Apr     Sun>=1  2:00    1:00    D
  418.         // America/Anchorage    Alaska  -9:00   US      AK%sT
  419.         // America/Juneau       Alaska  -9:00   US      AK%sT
  420.         // America/Nome Alaska  -9:00   US      AK%sT
  421.         // America/Yakutat      Alaska  -9:00   US      AK%sT
  422.         //----------------------------------------------------------
  423. //        new SimpleTimeZone((int)(-8.5 * millisPerHour), "Pacific/Pitcairn" /*PNT*/),
  424.         // Pacific/Pitcairn     Pitcairn        -8:30   -       PNT     # Pitcairn Time
  425.         //----------------------------------------------------------
  426.         new SimpleTimeZone(-8 * millisPerHour, "America/Los_Angeles" /*P%sT*/,
  427.                 Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  428.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  429.         // Rule US      1967    max     -       Oct     lastSun 2:00    0       S
  430.         // Rule US      1987    max     -       Apr     Sun>=1  2:00    1:00    D
  431.         // America/Los_Angeles  US Pacific time, represented by Los Angeles     -8:00   US      P%sT
  432.         // America/Ensenada     Mexico  -8:00   Mexico  P%sT
  433.         // America/Tijuana      Mexico  -8:00   Mexico  P%sT
  434.         // America/Dawson       Northwest Territories, Yukon    -8:00   NT_YK   P%sT
  435.         // America/Whitehorse   Northwest Territories, Yukon    -8:00   NT_YK   P%sT
  436.         // America/Vancouver    British Columbia        -8:00   Vanc    P%sT
  437.         //----------------------------------------------------------
  438.         new SimpleTimeZone(-7 * millisPerHour, "America/Phoenix" /*MST*/),
  439.         // America/Phoenix      ?       -7:00   -       MST
  440.         // America/Dawson_Creek British Columbia        -7:00   -       MST
  441.         //----------------------------------------------------------
  442.         new SimpleTimeZone(-7 * millisPerHour, "America/Denver" /*M%sT*/,
  443.                 Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  444.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  445.         // Rule US      1967    max     -       Oct     lastSun 2:00    0       S
  446.         // Rule US      1987    max     -       Apr     Sun>=1  2:00    1:00    D
  447.         // America/Denver       US Mountain time, represented by Denver -7:00   US      M%sT
  448.         // America/Edmonton     Alberta -7:00   Edm     M%sT
  449.         // America/Mazatlan     Mexico  -7:00   Mexico  M%sT
  450.         // America/Inuvik       Northwest Territories, Yukon    -7:00   NT_YK   M%sT
  451.         // America/Yellowknife  Northwest Territories, Yukon    -7:00   NT_YK   M%sT
  452.         // America/Boise        ?       -7:00   US      M%sT
  453.         //----------------------------------------------------------
  454. //        new SimpleTimeZone(-6 * millisPerHour, "America/Costa_Rica" /*C%sT*/),
  455.         // America/Costa_Rica   Costa Rica      -6:00   -       C%sT
  456.         // America/Belize       Belize  -6:00   -       C%sT
  457.         // America/El_Salvador  El Salvador     -6:00   -       C%sT
  458.         // America/Guatemala    Guatemala       -6:00   -       C%sT
  459.         // America/Regina       Saskatchewan    -6:00   -       CST
  460.         // America/Swift_Current        Saskatchewan    -6:00   -       CST
  461.         // America/Tegucigalpa  Honduras        -6:00   -       C%sT
  462.         // Pacific/Galapagos    Ecuador -6:00   -       GALT    # Galapagos Time
  463.         //----------------------------------------------------------
  464.         new SimpleTimeZone(-6 * millisPerHour, "America/Chicago" /*C%sT*/,
  465.                 Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  466.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  467.         // Rule US      1967    max     -       Oct     lastSun 2:00    0       S
  468.         // Rule US      1987    max     -       Apr     Sun>=1  2:00    1:00    D
  469.         // America/Chicago      US Central time, represented by Chicago -6:00   US      C%sT
  470.         // America/Rainy_River  Ontario, Quebec -6:00   Canada  C%sT
  471.         // America/Mexico_City  Mexico  -6:00   Mexico  C%sT
  472.         // America/Rankin_Inlet Northwest Territories, Yukon    -6:00   NT_YK   C%sT
  473.         // America/Menominee    Michigan        -6:00   US      C%sT
  474.         // America/Winnipeg     Manitoba        -6:00   Winn    C%sT
  475.         //----------------------------------------------------------
  476. //        new SimpleTimeZone(-6 * millisPerHour, "Pacific/Easter" /*EAS%sT*/,
  477. //                Calendar.OCTOBER, 9, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour,
  478. //                Calendar.MARCH, 9, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  479.         // Rule Chile   1969    max     -       Oct     Sun>=9  0:00    1:00    S
  480.         // Rule Chile   1970    max     -       Mar     Sun>=9  0:00    0       -
  481.         // Pacific/Easter       Chile   -6:00   Chile   EAS%sT
  482.         //----------------------------------------------------------
  483.         new SimpleTimeZone(-5 * millisPerHour, "America/Indianapolis" /*EST*/),
  484.         // America/Indianapolis Indiana -5:00   -       EST
  485.         // America/Bogota       Colombia        -5:00   -       CO%sT   # Colombia Time
  486.         // America/Cayman       Cayman Is       -5:00   -       EST
  487.         // America/Guayaquil    Ecuador -5:00   -       ECT     # Ecuador Time
  488.         // America/Indiana/Knox Indiana -5:00   -       EST
  489.         // America/Indiana/Marengo      Indiana -5:00   -       EST
  490.         // America/Indiana/Vevay        Indiana -5:00   -       EST
  491.         // America/Jamaica      Jamaica -5:00   -       EST
  492.         // America/Lima Peru    -5:00   -       PE%sT   # Peru Time
  493.         // America/Managua      Nicaragua       -5:00   -       EST
  494.         // America/Panama       Panama  -5:00   -       EST
  495.         // America/Porto_Acre   Brazil  -5:00   -       AST
  496.         //----------------------------------------------------------
  497.         new SimpleTimeZone(-5 * millisPerHour, "America/New_York" /*E%sT*/,
  498.                 Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  499.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  500.         // Rule US      1967    max     -       Oct     lastSun 2:00    0       S
  501.         // Rule US      1987    max     -       Apr     Sun>=1  2:00    1:00    D
  502.         // America/New_York     US Eastern time, represented by New York        -5:00   US      E%sT
  503.         // America/Nassau       Bahamas -5:00   Bahamas E%sT
  504.         // America/Nipigon      Ontario, Quebec -5:00   Canada  E%sT
  505.         // America/Thunder_Bay  Ontario, Quebec -5:00   Canada  E%sT
  506.         // America/Montreal     Ontario, Quebec -5:00   Mont    E%sT
  507.         // America/Iqaluit      Northwest Territories, Yukon    -5:00   NT_YK   E%sT
  508.         // America/Detroit      Michigan        -5:00   US      E%sT
  509.         // America/Louisville   ?       -5:00   US      E%sT
  510.         //----------------------------------------------------------
  511. //        new SimpleTimeZone(-5 * millisPerHour, "America/Havana" /*C%sT*/,
  512. //                Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour,
  513. //                Calendar.OCTOBER, 8, -Calendar.SUNDAY /*DOW>=DOM*/, 1 * millisPerHour, 1 * millisPerHour),
  514.         // Rule Cuba    1990    max     -       Apr     Sun>=1  0:00    1:00    D
  515.         // Rule Cuba    1997    max     -       Oct     Sun>=8  0:00s   0       S
  516.         // America/Havana       Cuba    -5:00   Cuba    C%sT
  517.         //----------------------------------------------------------
  518. //        new SimpleTimeZone(-5 * millisPerHour, "America/Port-au-Prince" /*E%sT*/,
  519. //                Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 1 * millisPerHour,
  520. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  521.         // Rule Haiti   1988    max     -       Apr     Sun>=1  1:00s   1:00    D
  522.         // Rule Haiti   1988    max     -       Oct     lastSun 1:00s   0       S
  523.         // America/Port-au-Prince       Haiti   -5:00   Haiti   E%sT
  524.         //----------------------------------------------------------
  525. //        new SimpleTimeZone(-5 * millisPerHour, "America/Grand_Turk" /*E%sT*/,
  526. //                Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour,
  527. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  528.         // Rule TC      1979    max     -       Oct     lastSun 0:00    0       S
  529.         // Rule TC      1987    max     -       Apr     Sun>=1  0:00    1:00    D
  530.         // America/Grand_Turk   Turks and Caicos        -5:00   TC      E%sT
  531.         //----------------------------------------------------------
  532.         new SimpleTimeZone(-4 * millisPerHour, "America/Caracas" /*VET*/),
  533.         // America/Caracas      Venezuela       -4:00   -       VET
  534.         // America/Anguilla     Anguilla        -4:00   -       AST
  535.         // America/Antigua      Antigua and Barbuda     -4:00   -       AST
  536.         // America/Aruba        Aruba   -4:00   -       AST
  537.         // America/Barbados     Barbados        -4:00   -       A%sT
  538.         // America/Curacao      Curacao -4:00   -       AST
  539.         // America/Dominica     Dominica        -4:00   -       AST
  540.         // America/Grenada      Grenada -4:00   -       AST
  541.         // America/Guadeloupe   Guadeloupe      -4:00   -       AST
  542.         // America/Guyana       Guyana  -4:00   -       GYT
  543.         // America/La_Paz       Bolivia -4:00   -       BOT     # Bolivia Time
  544.         // America/Manaus       Brazil  -4:00   -       WST
  545.         // America/Martinique   Martinique      -4:00   -       AST
  546.         // America/Montserrat   Montserrat      -4:00   -       AST
  547.         // America/Port_of_Spain        Trinidad and Tobago     -4:00   -       AST
  548.         // America/Puerto_Rico  Puerto Rico     -4:00   -       AST
  549.         // America/Santo_Domingo        Dominican Republic      -4:00   -       AST
  550.         // America/St_Kitts     St Kitts-Nevis  -4:00   -       AST
  551.         // America/St_Lucia     St Lucia        -4:00   -       AST
  552.         // America/St_Thomas    Virgin Is       -4:00   -       AST
  553.         // America/St_Vincent   St Vincent and the Grenadines   -4:00   -       AST
  554.         // America/Tortola      British Virgin Is       -4:00   -       AST
  555.         //----------------------------------------------------------
  556. //        new SimpleTimeZone(-4 * millisPerHour, "America/Cuiaba" /*W%sT*/,
  557. //                Calendar.OCTOBER, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour,
  558. //                Calendar.FEBRUARY, 11, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  559.         // Rule Brazil  1996    max     -       Feb     Sun>=11 0:00    0       S
  560.         // Rule Brazil  1996    max     -       Oct     Sun>=1  0:00    1:00    D
  561.         // America/Cuiaba       Brazil  -4:00   Brazil  W%sT
  562.         //----------------------------------------------------------
  563.         new SimpleTimeZone(-4 * millisPerHour, "America/Halifax" /*A%sT*/,
  564.                 Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  565.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  566.         // Rule Halifax 1962    max     -       Oct     lastSun 2:00    0       S
  567.         // Rule Halifax 1987    max     -       Apr     Sun>=1  2:00    1:00    D
  568.         // America/Halifax      ?       -4:00   Halifax A%sT
  569.         // Atlantic/Bermuda     Bermuda -4:00   Bahamas A%sT
  570.         // America/Glace_Bay    ?       -4:00   Halifax A%sT
  571.         // America/Pangnirtung  Northwest Territories, Yukon    -4:00   NT_YK   A%sT
  572.         // America/Goose_Bay    east Labrador   -4:00   StJohns A%sT
  573.         // America/Thule        ?       -4:00   Thule   A%sT
  574.         //----------------------------------------------------------
  575. //        new SimpleTimeZone(-4 * millisPerHour, "America/Santiago" /*CL%sT*/,
  576. //                Calendar.OCTOBER, 9, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour,
  577. //                Calendar.MARCH, 9, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  578.         // Rule Chile   1969    max     -       Oct     Sun>=9  0:00    1:00    S
  579.         // Rule Chile   1970    max     -       Mar     Sun>=9  0:00    0       -
  580.         // America/Santiago     Chile   -4:00   Chile   CL%sT
  581.         // Antarctica/Palmer    USA - year-round bases  -4:00   ChileAQ CL%sT
  582.         //----------------------------------------------------------
  583. //        new SimpleTimeZone(-4 * millisPerHour, "Atlantic/Stanley" /*FK%sT*/,
  584. //                Calendar.SEPTEMBER, 8, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour,
  585. //                Calendar.APRIL, 16, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  586.         // Rule Falk    1986    max     -       Apr     Sun>=16 0:00    0       -
  587.         // Rule Falk    1996    max     -       Sep     Sun>=8  0:00    1:00    S
  588.         // Atlantic/Stanley     Falklands       -4:00   Falk    FK%sT
  589.         //----------------------------------------------------------
  590. //        new SimpleTimeZone(-4 * millisPerHour, "America/Asuncion" /*PY%sT*/,
  591. //                Calendar.OCTOBER, 1, 0 /*DOM*/, 0 * millisPerHour,
  592. //                Calendar.MARCH, 1, 0 /*DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  593.         // Rule Para    1996    max     -       Mar     1       0:00    0       -
  594.         // Rule Para    1997    max     -       Oct     1       0:00    1:00    S
  595.         // America/Asuncion     Paraguay        -4:00   Para    PY%sT
  596.         //----------------------------------------------------------
  597.         new SimpleTimeZone((int)(-3.5 * millisPerHour), "America/St_Johns" /*N%sT*/,
  598.                 Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  599.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  600.         // Rule StJohns 1960    max     -       Oct     lastSun 2:00    0       S
  601.         // Rule StJohns 1989    max     -       Apr     Sun>=1  2:00    1:00    D
  602.         // America/St_Johns     Canada  -3:30   StJohns N%sT
  603.         //----------------------------------------------------------
  604.         new SimpleTimeZone(-3 * millisPerHour, "America/Buenos_Aires" /*AR%sT*/),
  605.         // America/Buenos_Aires Argentina       -3:00   -       AR%sT
  606.         // America/Catamarca    Argentina       -3:00   -       ART
  607.         // America/Cayenne      French Guiana   -3:00   -       GFT
  608.         // America/Cordoba      Argentina       -3:00   -       ART
  609.         // America/Fortaleza    Brazil  -3:00   -       EST
  610.         // America/Jujuy        Argentina       -3:00   -       ART
  611.         // America/Mendoza      Argentina       -3:00   -       ART
  612.         // America/Montevideo   Uruguay -3:00   -       UY%sT
  613.         // America/Paramaribo   Suriname        -3:00   -       SRT
  614.         // America/Rosario      Argentina       -3:00   -       ART
  615.         //----------------------------------------------------------
  616.         new SimpleTimeZone(-3 * millisPerHour, "America/Sao_Paulo" /*E%sT*/,
  617.                 Calendar.OCTOBER, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour,
  618.                 Calendar.FEBRUARY, 11, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  619.         // Rule Brazil  1996    max     -       Feb     Sun>=11 0:00    0       S
  620.         // Rule Brazil  1996    max     -       Oct     Sun>=1  0:00    1:00    D
  621.         // America/Sao_Paulo    Brazil  -3:00   Brazil  E%sT
  622.         // America/Maceio       Brazil  -3:00   Brazil  E%sT
  623.         //----------------------------------------------------------
  624. //        new SimpleTimeZone(-3 * millisPerHour, "America/Miquelon" /*PM%sT*/,
  625. //                Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  626. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  627.         // Rule Mont    1957    max     -       Oct     lastSun 2:00    0       S
  628.         // Rule Mont    1987    max     -       Apr     Sun>=1  2:00    1:00    D
  629.         // America/Miquelon     St Pierre and Miquelon  -3:00   Mont    PM%sT   # Pierre & Miquelon Time
  630.         //----------------------------------------------------------
  631. //        new SimpleTimeZone(-3 * millisPerHour, "America/Godthab" /*WG%sT*/,
  632. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, -2 * millisPerHour,
  633. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, -2 * millisPerHour, 1 * millisPerHour),
  634.         // Rule EU      1981    max     -       Mar     lastSun 1:00u   1:00    S
  635.         // Rule EU      1996    max     -       Oct     lastSun 1:00u   0       -
  636.         // America/Godthab      ?       -3:00   EU      WG%sT
  637.         //----------------------------------------------------------
  638. //        new SimpleTimeZone(-2 * millisPerHour, "Atlantic/South_Georgia" /*GST*/),
  639.         // Atlantic/South_Georgia       South Georgia   -2:00   -       GST     # South Georgia Time
  640.         // America/Noronha      Brazil  -2:00   -       FST
  641.         //----------------------------------------------------------
  642.         new SimpleTimeZone(-1 * millisPerHour, "Atlantic/Cape_Verde" /*CVT*/),
  643.         // Atlantic/Cape_Verde  Cape Verde      -1:00   -       CVT
  644.         // Atlantic/Jan_Mayen   Norway  -1:00   -       EGT
  645.         //----------------------------------------------------------
  646.         new SimpleTimeZone(-1 * millisPerHour, "Atlantic/Azores" /*AZO%sT*/,
  647.                 Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour,
  648.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  649.         // Rule EU      1981    max     -       Mar     lastSun 1:00u   1:00    S
  650.         // Rule EU      1996    max     -       Oct     lastSun 1:00u   0       -
  651.         // Atlantic/Azores      Portugal        -1:00   EU      AZO%sT
  652.         // America/Scoresbysund ?       -1:00   EU      EG%sT
  653.         //----------------------------------------------------------
  654.         new SimpleTimeZone(0 * millisPerHour, "Africa/Casablanca" /*WET*/),
  655.         // Africa/Casablanca    Morocco 0:00    -       WET
  656.         // Africa/Abidjan       Cote D'Ivoire   0:00    -       WAT
  657.         // Africa/Accra Ghana   0:00    -       %s
  658.         // Africa/Bamako        Mali    0:00    -       WAT
  659.         // Africa/Banjul        Gambia  0:00    -       WAT
  660.         // Africa/Bissau        Guinea-Bissau   0:00    -       WAT
  661.         // Africa/Conakry       Guinea  0:00    -       WAT
  662.         // Africa/Dakar Senegal 0:00    -       WAT
  663.         // Africa/El_Aaiun      Morocco 0:00    -       WET
  664.         // Africa/Freetown      Sierra Leone    0:00    -       WA%sT
  665.         // Africa/Lome  Togo    0:00    -       WAT
  666.         // Africa/Monrovia      Liberia 0:00    -       WAT
  667.         // Africa/Nouakchott    Mauritania      0:00    -       WAT
  668.         // Africa/Ouagadougou   Burkina Faso    0:00    -       WAT
  669.         // Africa/Sao_Tome      Sao Tome and Principe   0:00    -       WAT
  670.         // Africa/Timbuktu      Mali    0:00    -       WAT
  671.         // Atlantic/Reykjavik   Iceland 0:00    -       GMT
  672.         // Atlantic/St_Helena   St Helena       0:00    -       GMT
  673.         //----------------------------------------------------------
  674. //        new SimpleTimeZone(0 * millisPerHour, "Europe/London" /*GMT/BST*/,
  675. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 1 * millisPerHour,
  676. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 1 * millisPerHour, 1 * millisPerHour),
  677.         // Rule EU      1981    max     -       Mar     lastSun 1:00u   1:00    S
  678.         // Rule EU      1996    max     -       Oct     lastSun 1:00u   0       -
  679.         // Europe/London        United Kingdom  0:00    EU      GMT/BST
  680.         // Atlantic/Canary      Spain   0:00    EU      WE%sT
  681.         // Atlantic/Faeroe      Denmark 0:00    EU      WE%sT
  682.         // Atlantic/Madeira     Portugal        0:00    EU      WE%sT
  683.         // Europe/Belfast       United Kingdom  0:00    EU      GMT/BST
  684.         // Europe/Dublin        United Kingdom  0:00    EU      GMT/IST
  685.         // Europe/Lisbon        Portugal        0:00    EU      WE%sT
  686.         // WET  Continental Europe      0:00    EU      WE%sT
  687.         //----------------------------------------------------------
  688. //        new SimpleTimeZone(1 * millisPerHour, "Africa/Lagos" /*CAT*/),
  689.         // Africa/Lagos Nigeria 1:00    -       CAT
  690.         // Africa/Algiers       Algeria 1:00    -       CET
  691.         // Africa/Bangui        Central African Republic        1:00    -       CAT
  692.         // Africa/Brazzaville   Congo   1:00    -       CAT
  693.         // Africa/Douala        Cameroon        1:00    -       CAT
  694.         // Africa/Kinshasa      Zaire   1:00    -       CAT
  695.         // Africa/Libreville    Gabon   1:00    -       CAT
  696.         // Africa/Luanda        Angola  1:00    -       CAT
  697.         // Africa/Malabo        Equatorial Guinea       1:00    -       CAT
  698.         // Africa/Ndjamena      Chad    1:00    -       CAT
  699.         // Africa/Niamey        Niger   1:00    -       CAT
  700.         // Africa/Porto-Novo    Benin   1:00    -       CAT
  701.         // Africa/Tunis Tunisia 1:00    -       CE%sT
  702.         //----------------------------------------------------------
  703.         new SimpleTimeZone(1 * millisPerHour, "Europe/Paris" /*CE%sT*/,
  704.                 Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  705.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  706.         // Rule EU      1981    max     -       Mar     lastSun 1:00u   1:00    S
  707.         // Rule EU      1996    max     -       Oct     lastSun 1:00u   0       -
  708.         // Europe/Paris France  1:00    EU      CE%sT
  709.         // Africa/Ceuta Spain   1:00    EU      CE%sT
  710.         // Europe/Amsterdam     Netherlands     1:00    EU      CE%sT
  711.         // Europe/Andorra       Andorra 1:00    EU      CE%sT
  712.         // Europe/Belgrade      Yugoslavia      1:00    EU      CE%sT
  713.         // Europe/Berlin        Germany 1:00    EU      CE%sT
  714.         // Europe/Brussels      Belgium 1:00    EU      CE%sT
  715.         // Europe/Budapest      Hungary 1:00    EU      CE%sT
  716.         // Europe/Copenhagen    Denmark 1:00    EU      CE%sT
  717.         // Europe/Gibraltar     Gibraltar       1:00    EU      CE%sT
  718.         // Europe/Ljubljana     Slovenia        1:00    EU      CE%sT
  719.         // Europe/Luxembourg    Luxembourg      1:00    EU      CE%sT
  720.         // Europe/Madrid        Spain   1:00    EU      CE%sT
  721.         // Europe/Malta Malta   1:00    EU      CE%sT
  722.         // Europe/Monaco        Monaco  1:00    EU      CE%sT
  723.         // Europe/Oslo  Norway  1:00    EU      CE%sT
  724.         // Europe/Prague        Czech Republic  1:00    EU      CE%sT
  725.         // Europe/Rome  Italy   1:00    EU      CE%sT
  726.         // Europe/Sarajevo      Bosnia and Herzegovina  1:00    EU      CE%sT
  727.         // Europe/Skopje        Macedonia       1:00    EU      CE%sT
  728.         // Europe/Stockholm     Sweden  1:00    EU      CE%sT
  729.         // Europe/Tirane        Albania 1:00    EU      CE%sT
  730.         // Europe/Vaduz Liechtenstein   1:00    EU      CE%sT
  731.         // Europe/Vienna        Austria 1:00    EU      CE%sT
  732.         // Europe/Zagreb        Croatia 1:00    EU      CE%sT
  733.         // Europe/Zurich        Switzerland     1:00    EU      CE%sT
  734.         //----------------------------------------------------------
  735. //        new SimpleTimeZone(1 * millisPerHour, "Africa/Tripoli" /*CE%sT*/,
  736. //                Calendar.MARCH, -1, Calendar.THURSDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  737. //                Calendar.OCTOBER, 1, -Calendar.THURSDAY /*DOW>=DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  738.         // Rule Libya   1997    max     -       Mar     lastThu 2:00s   1:00    S
  739.         // Rule Libya   1997    max     -       Oct     Thu>=1  2:00s   0       -
  740.         // Africa/Tripoli       Libya   1:00    Libya   CE%sT
  741.         //----------------------------------------------------------
  742.         // Omitting zone CET
  743.         // Rule C-Eur   1981    max     -       Mar     lastSun 2:00s   1:00    S
  744.         // Rule C-Eur   1996    max     -       Oct     lastSun 2:00s   0       -
  745.         // CET  Continental Europe      1:00    C-Eur   CE%sT
  746.         // MET  Continental Europe      1:00    C-Eur   ME%sT
  747.         //----------------------------------------------------------
  748. //        new SimpleTimeZone(1 * millisPerHour, "Europe/Warsaw" /*CE%sT*/,
  749. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 1 * millisPerHour,
  750. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  751.         // Rule W-Eur   1981    max     -       Mar     lastSun 1:00s   1:00    S
  752.         // Rule W-Eur   1996    max     -       Oct     lastSun 1:00s   0       -
  753.         // Europe/Warsaw        Poland  1:00    W-Eur   CE%sT
  754.         //----------------------------------------------------------
  755. //        new SimpleTimeZone(2 * millisPerHour, "Africa/Johannesburg" /*SA%sT*/),
  756.         // Africa/Johannesburg  South Africa    2:00    -       SA%sT
  757.         // Africa/Blantyre      Malawi  2:00    -       SAT
  758.         // Africa/Bujumbura     Burundi 2:00    -       SAT
  759.         // Africa/Gaborone      Botswana        2:00    -       SAT
  760.         // Africa/Harare        Zimbabwe        2:00    -       SAT
  761.         // Africa/Khartoum      Sudan   2:00    -       EE%sT
  762.         // Africa/Kigali        Rwanda  2:00    -       SAT
  763.         // Africa/Lubumbashi    Zaire   2:00    -       SAT
  764.         // Africa/Lusaka        Zambia  2:00    -       SAT
  765.         // Africa/Maputo        Mozambique      2:00    -       SAT
  766.         // Africa/Maseru        Lesotho 2:00    -       SAT
  767.         // Africa/Mbabane       Swaziland       2:00    -       SAT
  768.         //----------------------------------------------------------
  769. //        new SimpleTimeZone(2 * millisPerHour, "Europe/Bucharest" /*EE%sT*/,
  770. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour,
  771. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  772.         // Rule E-Eur   1981    max     -       Mar     lastSun 0:00    1:00    S
  773.         // Rule E-Eur   1996    max     -       Oct     lastSun 0:00    0       -
  774.         // Europe/Bucharest     Romania 2:00    E-Eur   EE%sT
  775.         // Europe/Chisinau      Moldova 2:00    E-Eur   EE%sT
  776.         // Europe/Sofia Bulgaria        2:00    E-Eur   EE%sT
  777.         //----------------------------------------------------------
  778.         new SimpleTimeZone(2 * millisPerHour, "Europe/Istanbul" /*EE%sT*/,
  779.                 Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour,
  780.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  781.         // Rule EU      1981    max     -       Mar     lastSun 1:00u   1:00    S
  782.         // Rule EU      1996    max     -       Oct     lastSun 1:00u   0       -
  783.         // Europe/Istanbul      Turkey  2:00    EU      EE%sT
  784.         // EET  Continental Europe      2:00    EU      EE%sT
  785.         // Europe/Athens        Greece  2:00    EU      EE%sT
  786.         // Europe/Helsinki      Finland 2:00    EU      EE%sT
  787.         // Europe/Kiev  Ukraine 2:00    EU      EE%sT
  788.         //----------------------------------------------------------
  789.         new SimpleTimeZone(2 * millisPerHour, "Africa/Cairo" /*EE%sT*/,
  790.                 Calendar.APRIL, -1, Calendar.FRIDAY /*DOW_IN_DOM*/, 0 * millisPerHour,
  791.                 Calendar.SEPTEMBER, -1, Calendar.FRIDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  792.         // Rule Egypt   1995    max     -       Apr     lastFri 0:00    1:00    S
  793.         // Rule Egypt   1995    max     -       Sep     lastFri 0:00    0       -
  794.         // Africa/Cairo Egypt   2:00    Egypt   EE%sT
  795.         //----------------------------------------------------------
  796. //        new SimpleTimeZone(2 * millisPerHour, "Asia/Amman" /*EE%sT*/,
  797. //                Calendar.APRIL, 1, -Calendar.FRIDAY /*DOW>=DOM*/, 0 * millisPerHour,
  798. //                Calendar.SEPTEMBER, 15, -Calendar.FRIDAY /*DOW>=DOM*/, 1 * millisPerHour, 1 * millisPerHour),
  799.         // Rule    Jordan       1993    max     -       Apr     Fri>=1  0:00    1:00    S
  800.         // Rule    Jordan       1995    max     -       Sep     Fri>=15 0:00s   0       -
  801.         // Asia/Amman   Jordan  2:00    Jordan  EE%sT
  802.         //----------------------------------------------------------
  803. //        new SimpleTimeZone(2 * millisPerHour, "Europe/Riga" /*EE%sT*/,
  804. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  805. //                Calendar.SEPTEMBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  806.         // Rule Latvia  1992    max     -       Mar     lastSun 2:00s   1:00    S
  807.         // Rule Latvia  1992    max     -       Sep     lastSun 2:00s   0       -
  808.         // Europe/Riga  Latvia  2:00    Latvia  EE%sT
  809.         //----------------------------------------------------------
  810. //        new SimpleTimeZone(2 * millisPerHour, "Asia/Beirut" /*EE%sT*/,
  811. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour,
  812. //                Calendar.SEPTEMBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  813.         // Rule Lebanon 1993    max     -       Mar     lastSun 0:00    1:00    S
  814.         // Rule Lebanon 1993    max     -       Sep     lastSun 0:00    0       -
  815.         // Asia/Beirut  Lebanon 2:00    Lebanon EE%sT
  816.         // Asia/Nicosia Cyprus  2:00    Cyprus  EE%sT
  817.         //----------------------------------------------------------
  818. //        new SimpleTimeZone(2 * millisPerHour, "Africa/Windhoek" /*SA%sT*/,
  819. //                Calendar.SEPTEMBER, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  820. //                Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  821.         // Rule Namibia 1994    max     -       Sep     Sun>=1  2:00    1:00    S
  822.         // Rule Namibia 1995    max     -       Apr     Sun>=1  2:00    0       -
  823.         // Africa/Windhoek      Namibia 2:00    Namibia SA%sT
  824.         //----------------------------------------------------------
  825. //        new SimpleTimeZone(2 * millisPerHour, "Europe/Minsk" /*EE%sT*/,
  826. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  827. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  828.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  829.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  830.         // Europe/Minsk Belarus 2:00    Russia  EE%sT
  831.         // Europe/Tallinn       Estonia 2:00    C-Eur   EE%sT
  832.         // Europe/Vilnius       Lithuania       2:00    C-Eur   EE%sT
  833.         // Europe/Kaliningrad   Russia  2:00    Russia  EE%sT
  834.         //----------------------------------------------------------
  835. //        new SimpleTimeZone(2 * millisPerHour, "Asia/Damascus" /*EE%sT*/,
  836. //                Calendar.APRIL, 1, 0 /*DOM*/, 0 * millisPerHour,
  837. //                Calendar.OCTOBER, 1, 0 /*DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  838.         // Rule Syria   1994    max     -       Apr     1       0:00    1:00    S
  839.         // Rule Syria   1994    max     -       Oct     1       0:00    0       -
  840.         // Asia/Damascus        Syria   2:00    Syria   EE%sT
  841.         //----------------------------------------------------------
  842. //        new SimpleTimeZone(2 * millisPerHour, "Asia/Jerusalem" /*I%sT*/,
  843. //                Calendar.MARCH, 15, -Calendar.FRIDAY /*DOW>=DOM*/, 0 * millisPerHour,
  844. //                Calendar.SEPTEMBER, 15, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  845.         // Rule Zion    1999    max     -       Mar     Fri>=15 0:00    1:00    D
  846.         // Rule Zion    1999    max     -       Sep     Sun>=15 0:00    0       S
  847.         // Asia/Jerusalem       Israel  2:00    Zion    I%sT
  848.         // Asia/Gaza    Palestine       2:00    Zion    I%sT
  849.         //----------------------------------------------------------
  850.         new SimpleTimeZone(3 * millisPerHour, "Asia/Riyadh" /*AST*/),
  851.         // Asia/Riyadh  Saudi Arabia    3:00    -       AST
  852.         // Africa/Addis_Ababa   Ethiopia        3:00    -       EAT
  853.         // Africa/Asmera        Eritrea 3:00    -       EAT
  854.         // Africa/Dar_es_Salaam Tanzania        3:00    -       EAT
  855.         // Africa/Djibouti      Djibouti        3:00    -       EAT
  856.         // Africa/Kampala       Uganda  3:00    -       EAT
  857.         // Africa/Mogadishu     Somalia 3:00    -       EAT
  858.         // Africa/Nairobi       Kenya   3:00    -       EAT
  859.         // Asia/Aden    Yemen   3:00    -       AST
  860.         // Asia/Bahrain Bahrain 3:00    -       AST
  861.         // Asia/Kuwait  Kuwait  3:00    -       AST
  862.         // Asia/Qatar   Qatar   3:00    -       AST
  863.         // Indian/Antananarivo  Madagascar      3:00    -       EAT
  864.         // Indian/Comoro        Comoros 3:00    -       EAT
  865.         // Indian/Mayotte       Mayotte 3:00    -       EAT
  866.         //----------------------------------------------------------
  867. //        new SimpleTimeZone(3 * millisPerHour, "Europe/Simferopol" /*MSK/MSD*/,
  868. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour,
  869. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  870.         // Rule Crimea  1996    max     -       Mar     lastSun 0:00u   1:00    -
  871.         // Rule Crimea  1996    max     -       Oct     lastSun 0:00u   0       -
  872.         // Europe/Simferopol    Ukraine 3:00    Crimea  MSK/MSD
  873.         //----------------------------------------------------------
  874. //        new SimpleTimeZone(3 * millisPerHour, "Asia/Baghdad" /*A%sT*/,
  875. //                Calendar.APRIL, 1, 0 /*DOM*/, 3 * millisPerHour,
  876. //                Calendar.OCTOBER, 1, 0 /*DOM*/, 4 * millisPerHour, 1 * millisPerHour),
  877.         // Rule Iraq    1991    max     -       Apr     1       3:00s   1:00    D
  878.         // Rule Iraq    1991    max     -       Oct     1       3:00s   0       D
  879.         // Asia/Baghdad Iraq    3:00    Iraq    A%sT
  880.         //----------------------------------------------------------
  881. //        new SimpleTimeZone(3 * millisPerHour, "Europe/Moscow" /*MSK/MSD*/,
  882. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  883. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  884.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  885.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  886.         // Europe/Moscow        Russia  3:00    Russia  MSK/MSD
  887.         //----------------------------------------------------------
  888.         new SimpleTimeZone((int)(3.5 * millisPerHour), "Asia/Tehran" /*IR%sT*/,
  889.                 Calendar.MARCH, 4, 0 /*DOM*/, 0 * millisPerHour,
  890.                 Calendar.SEPTEMBER, 4, 0 /*DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  891.         // Rule Iran    1997    1999    -       Mar     21      0:00    1:00    S
  892.         // Rule Iran    1997    1999    -       Sep     23      0:00    0       -
  893.         // Asia/Tehran  Iran    3:30    Iran    IR%sT
  894.         //----------------------------------------------------------
  895.         new SimpleTimeZone(4 * millisPerHour, "Asia/Yerevan" /*AM%sT*/),
  896.         // Asia/Yerevan Armenia 4:00    -       AM%sT
  897.         // Asia/Dubai   United Arab Emirates    4:00    -       GST
  898.         // Asia/Muscat  Oman    4:00    -       GST
  899.         // Indian/Mahe  Seychelles      4:00    -       SCT     # Seychelles Time
  900.         // Indian/Mauritius     Mauritius       4:00    -       MUT     # Mauritius Time
  901.         // Indian/Reunion       Reunion 4:00    -       RET     # Reunion Time
  902.         //----------------------------------------------------------
  903. //        new SimpleTimeZone(4 * millisPerHour, "Asia/Aqtau" /*AQT%sT*/,
  904. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour,
  905. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  906.         // Rule E-EurAsia       1981    max     -       Mar     lastSun 0:00    1:00    S
  907.         // Rule E-EurAsia       1996    max     -       Oct     lastSun 0:00    0       -
  908.         // Asia/Aqtau   Kazakhstan      4:00 E-EurAsia  AQT%sT
  909.         //----------------------------------------------------------
  910. //        new SimpleTimeZone(4 * millisPerHour, "Asia/Baku" /*AZ%sT*/,
  911. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 5 * millisPerHour,
  912. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 5 * millisPerHour, 1 * millisPerHour),
  913.         // Rule EUAsia  1981    max     -       Mar     lastSun 1:00u   1:00    S
  914.         // Rule EUAsia  1996    max     -       Oct     lastSun 1:00u   0       -
  915.         // Asia/Baku    Azerbaijan      4:00    EUAsia  AZ%sT
  916.         //----------------------------------------------------------
  917. //        new SimpleTimeZone(4 * millisPerHour, "Europe/Samara" /*SAM%sT*/,
  918. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  919. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  920.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  921.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  922.         // Europe/Samara        Russia  4:00    Russia  SAM%sT
  923.         //----------------------------------------------------------
  924. //        new SimpleTimeZone((int)(4.5 * millisPerHour), "Asia/Kabul" /*AFT*/),
  925.         // Asia/Kabul   Afghanistan     4:30    -       AFT
  926.         //----------------------------------------------------------
  927.         new SimpleTimeZone(5 * millisPerHour, "Asia/Karachi" /*PKT*/),
  928.         // Asia/Karachi Pakistan        5:00    -       PKT     # Pakistan Time
  929.         // Asia/Ashkhabad       Turkmenistan    5:00    -       TMT     # Turkmenistan Time
  930.         // Asia/Dushanbe        Tajikistan      5:00    -       TJT     # Tajikistan Time
  931.         // Asia/Tashkent        Uzbekistan      5:00    -       UZT     # Uzbekistan Time
  932.         // Asia/Tbilisi Georgia 5:00    -       GET
  933.         // Indian/Chagos        British Indian Ocean Territory  5:00    -       IOT     # BIOT Time
  934.         // Indian/Kerguelen     France - year-round bases       5:00    -       TFT     # ISO code TF Time
  935.         // Indian/Maldives      Maldives        5:00    -       MVT     # Maldives Time
  936.         //----------------------------------------------------------
  937. //        new SimpleTimeZone(5 * millisPerHour, "Asia/Aqtobe" /*AQT%sT*/,
  938. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour,
  939. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  940.         // Rule E-EurAsia       1981    max     -       Mar     lastSun 0:00    1:00    S
  941.         // Rule E-EurAsia       1996    max     -       Oct     lastSun 0:00    0       -
  942.         // Asia/Aqtobe  Kazakhstan      5:00 E-EurAsia  AQT%sT
  943.         //----------------------------------------------------------
  944. //        new SimpleTimeZone(5 * millisPerHour, "Asia/Bishkek" /*KG%sT*/,
  945. //                Calendar.APRIL, 7, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour,
  946. //                Calendar.SEPTEMBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  947.         // Rule Kirgiz  1992    max     -       Apr     Sun>=7  0:00    1:00    S
  948.         // Rule Kirgiz  1991    max     -       Sep     lastSun 0:00    0       -
  949.         // Asia/Bishkek Kirgizstan      5:00    Kirgiz  KG%sT   # Kirgizstan Time
  950.         //----------------------------------------------------------
  951. //        new SimpleTimeZone(5 * millisPerHour, "Asia/Yekaterinburg" /*YEK%sT*/,
  952. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  953. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  954.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  955.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  956.         // Asia/Yekaterinburg   Russia  5:00    Russia  YEK%sT  # Yekaterinburg Time
  957.         //----------------------------------------------------------
  958.         new SimpleTimeZone((int)(5.5 * millisPerHour), "Asia/Calcutta" /*IST*/),
  959.         // Asia/Calcutta        India   5:30    -       IST
  960.         //----------------------------------------------------------
  961. //        new SimpleTimeZone((int)(5.75 * millisPerHour), "Asia/Katmandu" /*NPT*/),
  962.         // Asia/Katmandu        Nepal   5:45    -       NPT     # Nepal Time
  963.         //----------------------------------------------------------
  964.         new SimpleTimeZone(6 * millisPerHour, "Asia/Dacca" /*BDT*/),
  965.         // Asia/Dacca   Bangladesh      6:00    -       BDT     # Bangladesh Time
  966.         // Antarctica/Mawson    Australia - territories 6:00    -       MAWT    # Mawson Time
  967.         // Asia/Colombo Sri Lanka       6:00    -       LKT
  968.         // Asia/Thimbu  Bhutan  6:00    -       BTT     # Bhutan Time
  969.         //----------------------------------------------------------
  970. //        new SimpleTimeZone(6 * millisPerHour, "Asia/Alma-Ata" /*ALM%sT*/,
  971. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour,
  972. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  973.         // Rule E-EurAsia       1981    max     -       Mar     lastSun 0:00    1:00    S
  974.         // Rule E-EurAsia       1996    max     -       Oct     lastSun 0:00    0       -
  975.         // Asia/Alma-Ata        Kazakhstan      6:00 E-EurAsia  ALM%sT
  976.         //----------------------------------------------------------
  977. //        new SimpleTimeZone(6 * millisPerHour, "Asia/Novosibirsk" /*NOV%sT*/,
  978. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  979. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  980.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  981.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  982.         // Asia/Novosibirsk     Russia  6:00    Russia  NOV%sT
  983.         // Asia/Omsk    Russia  6:00    Russia  OMS%sT
  984.         //----------------------------------------------------------
  985. //        new SimpleTimeZone((int)(6.5 * millisPerHour), "Asia/Rangoon" /*MMT*/),
  986.         // Asia/Rangoon Burma / Myanmar 6:30    -       MMT     # Myanmar Time
  987.         // Indian/Cocos Cocos   6:30    -       CCT     # Cocos Islands Time
  988.         //----------------------------------------------------------
  989.         new SimpleTimeZone(7 * millisPerHour, "Asia/Bangkok" /*ICT*/),
  990.         // Asia/Bangkok Thailand        7:00    -       ICT
  991.         // Asia/Jakarta Indonesia       7:00    -       JAVT
  992.         // Asia/Phnom_Penh      Cambodia        7:00    -       ICT
  993.         // Asia/Saigon  Vietnam 7:00    -       ICT
  994.         // Asia/Vientiane       Laos    7:00    -       ICT
  995.         // Indian/Christmas     Australian miscellany   7:00    -       CXT     # Christmas Island Time
  996.         //----------------------------------------------------------
  997. //        new SimpleTimeZone(7 * millisPerHour, "Asia/Krasnoyarsk" /*KRA%sT*/,
  998. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  999. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1000.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  1001.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  1002.         // Asia/Krasnoyarsk     Russia  7:00    Russia  KRA%sT
  1003.         //----------------------------------------------------------
  1004.         new SimpleTimeZone(8 * millisPerHour, "Asia/Shanghai" /*C%sT*/),
  1005.         // Asia/Shanghai        People's Republic of China      8:00    -       C%sT
  1006.         // Antarctica/Casey     Australia - territories 8:00    -       WST     # Western (Aus) Standard Time
  1007.         // Asia/Brunei  Brunei  8:00    -       BNT
  1008.         // Asia/Chungking       People's Republic of China      8:00    -       C%sT
  1009.         // Asia/Harbin  People's Republic of China      8:00    -       C%sT
  1010.         // Asia/Hong_Kong       Hong Kong       8:00    -       C%sT
  1011.         // Asia/Ishigaki        Japan   8:00    -       CST
  1012.         // Asia/Kashgar People's Republic of China      8:00    -       C%sT
  1013.         // Asia/Kuala_Lumpur    Malaysia        8:00    -       MYT     # Malaysia Time
  1014.         // Asia/Kuching Malaysia        8:00    -       MYT
  1015.         // Asia/Macao   Macao   8:00    -       C%sT
  1016.         // Asia/Manila  Philippines     8:00    -       PH%sT
  1017.         // Asia/Singapore       Singapore       8:00    -       SGT
  1018.         // Asia/Taipei  Republic of China       8:00    -       C%sT
  1019.         // Asia/Ujung_Pandang   Indonesia       8:00    -       BORT
  1020.         // Asia/Urumqi  People's Republic of China      8:00    -       C%sT
  1021.         // Australia/Perth      Australia       8:00    -       WST
  1022.         //----------------------------------------------------------
  1023. //        new SimpleTimeZone(8 * millisPerHour, "Asia/Ulan_Bator" /*ULA%sT*/,
  1024. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour,
  1025. //                Calendar.SEPTEMBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  1026.         // Rule Mongol  1991    max     -       Mar     lastSun 0:00    1:00    S
  1027.         // Rule Mongol  1997    max     -       Sep     lastSun 0:00    0       -
  1028.         // Asia/Ulan_Bator      Mongolia        8:00    Mongol  ULA%sT
  1029.         //----------------------------------------------------------
  1030. //        new SimpleTimeZone(8 * millisPerHour, "Asia/Irkutsk" /*IRK%sT*/,
  1031. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1032. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1033.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  1034.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  1035.         // Asia/Irkutsk Russia  8:00    Russia  IRK%sT
  1036.         //----------------------------------------------------------
  1037.         new SimpleTimeZone(9 * millisPerHour, "Asia/Tokyo" /*JST*/),
  1038.         // Asia/Tokyo   Japan   9:00    -       JST
  1039.         // Asia/Jayapura        Indonesia       9:00    -       JAYT
  1040.         // Asia/Pyongyang       Korea   9:00    -       KST
  1041.         // Asia/Seoul   Korea   9:00    -       K%sT
  1042.         // Pacific/Palau        Palau   9:00    -       PWT     # Palau Time
  1043.         //----------------------------------------------------------
  1044. //        new SimpleTimeZone(9 * millisPerHour, "Asia/Yakutsk" /*YAK%sT*/,
  1045. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1046. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1047.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  1048.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  1049.         // Asia/Yakutsk Russia  9:00    Russia  YAK%sT
  1050.         //----------------------------------------------------------
  1051.         new SimpleTimeZone((int)(9.5 * millisPerHour), "Australia/Darwin" /*CST*/),
  1052.         // Australia/Darwin     Australia       9:30    -       CST
  1053.         //----------------------------------------------------------
  1054.         new SimpleTimeZone((int)(9.5 * millisPerHour), "Australia/Adelaide" /*CST*/,
  1055.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1056.                 Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1057.         // Rule AS      1987    max     -       Oct     lastSun 2:00s   1:00    -
  1058.         // Rule AS      1995    max     -       Mar     lastSun 2:00s   0       -
  1059.         // Australia/Adelaide   South Australia 9:30    AS      CST
  1060.         // Australia/Broken_Hill        New South Wales 9:30    AN      CST
  1061.         //----------------------------------------------------------
  1062. //        new SimpleTimeZone(10 * millisPerHour, "Australia/Brisbane" /*EST*/),
  1063.         // Australia/Brisbane   Australia       10:00   -       EST
  1064.         // Antarctica/DumontDUrville    France - year-round bases       10:00   -       DDUT    # Dumont-d'Urville Time
  1065.         // Australia/Lindeman   Australia       10:00   -       EST
  1066.         // Pacific/Guam Guam    10:00   -       GST
  1067.         // Pacific/Port_Moresby Papua New Guinea        10:00   -       PGT     # Papua New Guinea Time
  1068.         // Pacific/Saipan       N Mariana Is    10:00   -       MPT
  1069.         // Pacific/Truk Micronesia      10:00   -       TRUT    # Truk Time
  1070.         // Pacific/Yap  Micronesia      10:00   -       YAPT
  1071.         //----------------------------------------------------------
  1072.         new SimpleTimeZone(10 * millisPerHour, "Australia/Sydney" /*EST*/,
  1073.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1074.                 Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1075.         // Rule AN      1987    max     -       Oct     lastSun 2:00s   1:00    -
  1076.         // Rule AN      1996    max     -       Mar     lastSun 2:00s   0       -
  1077.         // Australia/Sydney     New South Wales 10:00   AN      EST
  1078.         // Australia/Melbourne  Victoria        10:00   AV      EST
  1079.         //----------------------------------------------------------
  1080. //        new SimpleTimeZone(10 * millisPerHour, "Australia/Hobart" /*EST*/,
  1081. //                Calendar.OCTOBER, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  1082. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1083.         // Rule AT      1991    max     -       Oct     Sun>=1  2:00s   1:00    -
  1084.         // Rule AT      1991    max     -       Mar     lastSun 2:00s   0       -
  1085.         // Australia/Hobart     Tasmania        10:00   AT      EST
  1086.         //----------------------------------------------------------
  1087. //        new SimpleTimeZone(10 * millisPerHour, "Asia/Vladivostok" /*VLA%sT*/,
  1088. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1089. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1090.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  1091.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  1092.         // Asia/Vladivostok     Russia  10:00   Russia  VLA%sT
  1093.         //----------------------------------------------------------
  1094. //        new SimpleTimeZone((int)(10.5 * millisPerHour), "Australia/Lord_Howe" /*LHST*/,
  1095. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1096. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, (int)(0.5 * millisPerHour)),
  1097.         // Rule LH      1987    max     -       Oct     lastSun 2:00s   0:30    -
  1098.         // Rule LH      1996    max     -       Mar     lastSun 2:00s   0       -
  1099.         // Australia/Lord_Howe  Lord Howe Island        10:30   LH      LHST
  1100.         //----------------------------------------------------------
  1101.         new SimpleTimeZone(11 * millisPerHour, "Pacific/Guadalcanal" /*SBT*/),
  1102.         // Pacific/Guadalcanal  Solomon Is      11:00   -       SBT     # Solomon Is Time
  1103.         // Pacific/Efate        Vanuatu 11:00   -       VU%sT   # Vanuatu Time
  1104.         // Pacific/Ponape       Micronesia      11:00   -       PONT    # Ponape Time
  1105.         //----------------------------------------------------------
  1106. //        new SimpleTimeZone(11 * millisPerHour, "Pacific/Noumea" /*NC%sT*/,
  1107. //                Calendar.NOVEMBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1108. //                Calendar.MARCH, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1109.         // Rule NC      1997    max     -       Mar     Sun>=1  2:00s   0       -
  1110.         // Rule NC      1997    max     -       Nov     lastSun 2:00s   1:00    S
  1111.         // Pacific/Noumea       New Caledonia   11:00   NC      NC%sT
  1112.         //----------------------------------------------------------
  1113. //        new SimpleTimeZone(11 * millisPerHour, "Asia/Magadan" /*MAG%sT*/,
  1114. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1115. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1116.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  1117.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  1118.         // Asia/Magadan Russia  11:00   Russia  MAG%sT
  1119.         //----------------------------------------------------------
  1120. //        new SimpleTimeZone((int)(11.5 * millisPerHour), "Pacific/Norfolk" /*NFT*/),
  1121.         // Pacific/Norfolk      Norfolk 11:30   -       NFT     # Norfolk Time
  1122.         //----------------------------------------------------------
  1123.         new SimpleTimeZone(12 * millisPerHour, "Pacific/Fiji" /*FJT*/),
  1124.         // Pacific/Fiji Fiji    12:00   -       FJT     # Fiji Time
  1125.         // Pacific/Funafuti     Tuvalu  12:00   -       TVT     # Tuvalu Time
  1126.         // Pacific/Kosrae       Micronesia      12:00   -       KOST    # Kosrae Time
  1127.         // Pacific/Kwajalein    Marshall Is     12:00   -       MHT
  1128.         // Pacific/Majuro       Marshall Is     12:00   -       MHT
  1129.         // Pacific/Nauru        Nauru   12:00   -       NRT
  1130.         // Pacific/Tarawa       Kiribati        12:00   -       GILT    # Gilbert Is Time
  1131.         // Pacific/Wake Wake    12:00   -       WAKT    # Wake Time
  1132.         // Pacific/Wallis       Wallis and Futuna       12:00   -       WFT     # Wallis & Futuna Time
  1133.         //----------------------------------------------------------
  1134.         new SimpleTimeZone(12 * millisPerHour, "Pacific/Auckland" /*NZ%sT*/,
  1135.                 Calendar.OCTOBER, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  1136.                 Calendar.MARCH, 15, -Calendar.SUNDAY /*DOW>=DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1137.         // Rule NZ      1990    max     -       Oct     Sun>=1  2:00s   1:00    D
  1138.         // Rule NZ      1990    max     -       Mar     Sun>=15 2:00s   0       S
  1139.         // Pacific/Auckland     New Zealand     12:00   NZ      NZ%sT
  1140.         // Antarctica/McMurdo   USA - year-round bases  12:00   NZAQ    NZ%sT
  1141.         //----------------------------------------------------------
  1142. //        new SimpleTimeZone(12 * millisPerHour, "Asia/Kamchatka" /*PET%sT*/,
  1143. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1144. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1145.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  1146.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  1147.         // Asia/Kamchatka       Russia  12:00   Russia  PET%sT
  1148.         //----------------------------------------------------------
  1149. //        new SimpleTimeZone((int)(12.75 * millisPerHour), "Pacific/Chatham" /*CHA%sT*/,
  1150. //                Calendar.OCTOBER, 1, -Calendar.SUNDAY /*DOW>=DOM*/, (int)(2.75 * millisPerHour),
  1151. //                Calendar.MARCH, 15, -Calendar.SUNDAY /*DOW>=DOM*/, (int)(3.75 * millisPerHour), 1 * millisPerHour),
  1152.         // Rule Chatham 1990    max     -       Oct     Sun>=1  2:45s   1:00    D
  1153.         // Rule Chatham 1991    max     -       Mar     Sun>=15 2:45s   0       S
  1154.         // Pacific/Chatham      New Zealand     12:45   Chatham CHA%sT
  1155.         //----------------------------------------------------------
  1156. //        new SimpleTimeZone(13 * millisPerHour, "Pacific/Tongatapu" /*TOT*/),
  1157.         // Pacific/Tongatapu    Tonga   13:00   -       TOT
  1158.         // Pacific/Enderbury    Kiribati        13:00   -       PHOT
  1159.         //----------------------------------------------------------
  1160. //        new SimpleTimeZone(13 * millisPerHour, "Asia/Anadyr" /*ANA%sT*/,
  1161. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1162. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1163.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  1164.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  1165.         // Asia/Anadyr  Russia  13:00   Russia  ANA%sT
  1166.         //----------------------------------------------------------
  1167. //        new SimpleTimeZone(14 * millisPerHour, "Pacific/Kiritimati" /*LINT*/),
  1168.         // Pacific/Kiritimati   Kiribati        14:00   -       LINT
  1169.         //----------------------------------------------------------
  1170.         // 347 total zones
  1171.         // 120 zones not including identical offset/rule zones
  1172.         // 96 zones not including equivalent offset/rule zones
  1173.     };
  1174.  
  1175.     /**
  1176.      * This array maps between the old three-letter IDs we used to use
  1177.      * and the current names of those zones.  We use this array during
  1178.      * initialization to provide backwards compatibility.
  1179.      *
  1180.      * Note in particular that these three-letter IDs are completely
  1181.      * wrong in some cases, and do not represent the correct abbreviations
  1182.      * in common use.  For example, "AST" is not the correct abbreviation for
  1183.      * Alaskan Standard Time; it is "AKST".  These IDs are for compatibilty
  1184.      * only, and their use is in fact deprecated.
  1185.      */
  1186.     private static final String[] compatibilityMap =
  1187.     {
  1188.         // GMT is the ID for Greenwich Mean Time time zone.
  1189.         /*GMT+0*/ "GMT", "Africa/Casablanca", // NOT Europe/London
  1190.                   "UTC", "Africa/Casablanca",
  1191.         // ECT is the ID for European Central Time time zone.
  1192.         /*GMT+1*/ "ECT", "Europe/Paris",
  1193.         // EET is the ID for Eastern European Time time zone.
  1194.         /*GMT+2*/ "EET", "Europe/Istanbul",
  1195.         // ART is the ID for (Arabic) Egypt Standard Time timezone.
  1196.         /*GMT+2*/ "ART", "Africa/Cairo",
  1197.         // EAT is the ID for Eastern African Time time zone.
  1198.         /*GMT+3*/ "EAT", "Asia/Riyadh",
  1199.         // MET is the ID for Middle East Time time zone.
  1200.         /*GMT+0330*/ "MET", "Asia/Tehran",
  1201.         // NET is the ID for Near East Time time zone.
  1202.         /*GMT+4*/ "NET", "Asia/Yerevan",
  1203.         // PLT is the ID for Pakistan Lahore Time time zone.
  1204.         /*GMT+5*/ "PLT", "Asia/Karachi",
  1205.         // IST is the ID for India Standard Time time zone.
  1206.         /*GMT+0550*/ "IST", "Asia/Calcutta",
  1207.         // BST is the ID for Bangladesh Standard Time time zone.
  1208.         /*GMT+6*/ "BST", "Asia/Dacca",
  1209.         // VST is the ID for Vietnam Standard Time time zone.
  1210.         /*GMT+7*/ "VST", "Asia/Bangkok",
  1211.         // CTT is the ID for China Taiwan Time time zone.
  1212.         /*GMT+8*/ "CTT", "Asia/Shanghai",
  1213.         // JST is the ID for Japan Standard Time time zone.
  1214.         /*GMT+9*/ "JST", "Asia/Tokyo",
  1215.         // ACT is the ID for Australia Central Time time zone.
  1216.         /*GMT+0930*/ "ACT", "Australia/Darwin",
  1217.         // AET is the ID for Australia Eastern Time time zone.
  1218.         /*GMT+10*/ "AET", "Australia/Sydney",
  1219.         // SST is the ID for Solomon Standard Time time zone.
  1220.         /*GMT+11*/ "SST", "Pacific/Guadalcanal",
  1221.         // NST is the ID for New Zealand Standard Time time zone.
  1222.         /*GMT+12*/ "NST", "Pacific/Fiji",
  1223.         // MIT is the ID for Midway Islands Time time zone.
  1224.         /*GMT-11*/ "MIT", "Pacific/Apia",
  1225.         // HST is the ID for Hawaii Standard Time time zone.
  1226.         /*GMT-10*/ "HST", "Pacific/Honolulu",
  1227.         // AST is the ID for Alaska Standard Time time zone.
  1228.         /*GMT-9*/ "AST", "America/Anchorage",
  1229.         // PST is the ID for Pacific Standard Time time zone.
  1230.         /*GMT-8*/ "PST", "America/Los_Angeles",
  1231.         // PNT is the ID for Phoenix Standard Time time zone.
  1232.         /*GMT-7*/ "PNT", "America/Phoenix",
  1233.         // MST is the ID for Mountain Standard Time time zone.
  1234.         /*GMT-7*/ "MST", "America/Denver",
  1235.         // CST is the ID for Central Standard Time time zone.
  1236.         /*GMT-6*/ "CST", "America/Chicago",
  1237.         // EST is the ID for Eastern Standard Time time zone.
  1238.         /*GMT-5*/ "EST", "America/New_York",
  1239.         // IET is the ID for Indiana Eastern Standard Time time zone.
  1240.         /*GMT-5*/ "IET", "America/Indianapolis",
  1241.         // PRT is the ID for Puerto Rico and US Virgin Islands Time time zone.
  1242.         /*GMT-4*/ "PRT", "America/Caracas",
  1243.         // CNT is the ID for Canada Newfoundland Time time zone.
  1244.         /*GMT-0330*/ "CNT", "America/St_Johns",
  1245.         // AGT is the ID for Argentina Standard Time time zone.
  1246.         /*GMT-3*/ "AGT", "America/Buenos_Aires",
  1247.         // BET is the ID for Brazil Eastern Time time zone.
  1248.         /*GMT-3*/ "BET", "America/Sao_Paulo",
  1249.         // CAT is the ID for Central African Time time zone.
  1250.         /*GMT-1*/ "CAT", "Atlantic/Cape_Verde",
  1251.     };
  1252.  
  1253.     private static Hashtable lookup = new Hashtable(zones.length);
  1254.  
  1255.     static {
  1256.         for (int i = 0; i < zones.length; ++i)
  1257.             lookup.put(zones[i].getID(), zones[i]);
  1258.  
  1259.         // We must create a new array with the cloned zones
  1260.         SimpleTimeZone[] newZones =
  1261.             new SimpleTimeZone[zones.length + (compatibilityMap.length / 2)];
  1262.         System.arraycopy(zones, 0, newZones, 0, zones.length);
  1263.  
  1264.         for (int i=0; i<compatibilityMap.length; i+=2)
  1265.         {
  1266.             // Make the map recognize the three-letter abbreviations as keys
  1267.             if (false)
  1268.             {
  1269.                 // Debugging code
  1270.                 if (lookup.get(compatibilityMap[i+1]) == null)
  1271.                     throw new InternalError("Bad TimeZone.idMap at " + i);
  1272.                 if (lookup.get(compatibilityMap[i]) != null)
  1273.                     throw new InternalError("Duplicate compatibilityMap " + compatibilityMap[i]);
  1274.             }
  1275.  
  1276.             // Implement the three-letter zone names in addition to the
  1277.             // long zone names.
  1278.             SimpleTimeZone zone =
  1279.                 (SimpleTimeZone) ((TimeZone) lookup.get(compatibilityMap[i+1])).clone();
  1280.             zone.setID(compatibilityMap[i]);
  1281.             newZones[zones.length + (i / 2)] = zone;
  1282.             lookup.put(compatibilityMap[i], zone);
  1283.         }
  1284.  
  1285.         zones = newZones;
  1286.  
  1287.         // Determine the MAXIMUM_ZONES_PER_OFFSET.  To use this to recompute the
  1288.         // maximum zones per offset, first set MAXIMUM_ZONES_PER_OFFSET to a
  1289.         // large value (like 100).  Then recompile.  Then set the boolean in the
  1290.         // if condition below to true.  Recompile again.  Now run any program
  1291.         // which will trigger this static initialization block.  Note the output
  1292.         // value.  Change MAXIMUM_ZONES_PER_OFFSET to the displayed value,
  1293.         // change the if condition back to false, and recompile again.
  1294.         if (false) {
  1295.             int max = 0;
  1296.             for (int i=-12; i<=12; ++i) {
  1297.                 int n = TimeZone.getAvailableIDs(i * 60*60*1000).length;
  1298.                 if (n > max) max = n;
  1299.             }
  1300.             System.out.println("    private static final int MAXIMUM_ZONES_PER_OFFSET = " +
  1301.                                max + ";");
  1302.         }
  1303.     }
  1304.  
  1305.     /**
  1306.      * Map a long ID to a short ID, if possible.  This method is used for
  1307.      * backward compatibility.
  1308.      * @param id the TimeZone long id.
  1309.      * @result the corresponding short ID, or the same ID if no short ID is found.
  1310.      */
  1311.     final static String mapLongIDtoShortID(String id) {
  1312.         for (int i=1; i<compatibilityMap.length; i+=2) {
  1313.             if (id.equals(compatibilityMap[i]))
  1314.                 return compatibilityMap[i-1];
  1315.         }
  1316.         return id;
  1317.     }
  1318. }
  1319.  
  1320. //eof
  1321.