Source Code Cross Referenced for DateFormatTest.java in  » Internationalization-Localization » icu4j » com » ibm » icu » dev » test » format » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Internationalization Localization » icu4j » com.ibm.icu.dev.test.format 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         *******************************************************************************
0003:         * Copyright (C) 2001-2006, International Business Machines Corporation and    *
0004:         * others. All Rights Reserved.                                                *
0005:         *******************************************************************************
0006:         */
0007:
0008:        /** 
0009:         * Port From:   ICU4C v1.8.1 : format : DateFormatTest
0010:         * Source File: $ICU4CRoot/source/test/intltest/dtfmttst.cpp
0011:         **/package com.ibm.icu.dev.test.format;
0012:
0013:        import com.ibm.icu.text.*;
0014:        import com.ibm.icu.util.*;
0015:        import com.ibm.icu.impl.*;
0016:        import java.util.Date;
0017:        import java.text.ParseException;
0018:        import java.text.ParsePosition;
0019:        import java.util.Locale;
0020:        import java.text.FieldPosition;
0021:        import java.util.ResourceBundle;
0022:
0023:        public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
0024:
0025:            public static void main(String[] args) throws Exception {
0026:                new DateFormatTest().run(args);
0027:            }
0028:
0029:            // Test written by Wally Wedel and emailed to me.
0030:            public void TestWallyWedel() {
0031:                /*
0032:                 * Instantiate a TimeZone so we can get the ids.
0033:                 */
0034:                //TimeZone tz = new SimpleTimeZone(7, ""); //The variable is never used
0035:                /*
0036:                 * Computational variables.
0037:                 */
0038:                int offset, hours, minutes;
0039:                /*
0040:                 * Instantiate a SimpleDateFormat set up to produce a full time
0041:                 zone name.
0042:                 */
0043:                SimpleDateFormat sdf = new SimpleDateFormat("zzzz");
0044:                /*
0045:                 * A String array for the time zone ids.
0046:                 */
0047:
0048:                final String[] ids = TimeZone.getAvailableIDs();
0049:                int ids_length = ids.length; //when fixed the bug should comment it out
0050:
0051:                /*
0052:                 * How many ids do we have?
0053:                 */
0054:                logln("Time Zone IDs size:" + ids_length);
0055:                /*
0056:                 * Column headings (sort of)
0057:                 */
0058:                logln("Ordinal ID offset(h:m) name");
0059:                /*
0060:                 * Loop through the tzs.
0061:                 */
0062:                Date today = new Date();
0063:                Calendar cal = Calendar.getInstance();
0064:                for (int i = 0; i < ids_length; i++) {
0065:                    logln(i + " " + ids[i]);
0066:                    TimeZone ttz = TimeZone.getTimeZone(ids[i]);
0067:                    // offset = ttz.getRawOffset();
0068:                    cal.setTimeZone(ttz);
0069:                    cal.setTime(today);
0070:                    offset = cal.get(Calendar.ZONE_OFFSET)
0071:                            + cal.get(Calendar.DST_OFFSET);
0072:                    // logln(i + " " + ids[i] + " offset " + offset);
0073:                    String sign = "+";
0074:                    if (offset < 0) {
0075:                        sign = "-";
0076:                        offset = -offset;
0077:                    }
0078:                    hours = offset / 3600000;
0079:                    minutes = (offset % 3600000) / 60000;
0080:                    String dstOffset = sign + (hours < 10 ? "0" : "") + hours
0081:                            + ":" + (minutes < 10 ? "0" : "") + minutes;
0082:                    /*
0083:                     * Instantiate a date so we can display the time zone name.
0084:                     */
0085:                    sdf.setTimeZone(ttz);
0086:                    /*
0087:                     * Format the output.
0088:                     */
0089:                    StringBuffer fmtOffset = new StringBuffer("");
0090:                    FieldPosition pos = new FieldPosition(0);
0091:
0092:                    try {
0093:                        fmtOffset = sdf.format(today, fmtOffset, pos);
0094:                    } catch (Exception e) {
0095:                        logln("Exception:" + e);
0096:                        continue;
0097:                    }
0098:                    // UnicodeString fmtOffset = tzS.toString();
0099:                    String fmtDstOffset = null;
0100:                    if (fmtOffset.toString().startsWith("GMT")) {
0101:                        //fmtDstOffset = fmtOffset.substring(3);
0102:                        fmtDstOffset = fmtOffset.substring(3, fmtOffset
0103:                                .length());
0104:                    }
0105:                    /*
0106:                     * Show our result.
0107:                     */
0108:
0109:                    boolean ok = fmtDstOffset == null
0110:                            || fmtDstOffset.equals("")
0111:                            || fmtDstOffset.equals(dstOffset);
0112:                    if (ok) {
0113:                        logln(i + " " + ids[i] + " " + dstOffset + " "
0114:                                + fmtOffset
0115:                                + (fmtDstOffset != null ? " ok" : " ?"));
0116:                    } else {
0117:                        errln(i + " " + ids[i] + " " + dstOffset + " "
0118:                                + fmtOffset + " *** FAIL ***");
0119:                    }
0120:
0121:                }
0122:            }
0123:
0124:            public void TestEquals() {
0125:                DateFormat fmtA = DateFormat.getDateTimeInstance(
0126:                        DateFormat.MEDIUM, DateFormat.FULL);
0127:                DateFormat fmtB = DateFormat.getDateTimeInstance(
0128:                        DateFormat.MEDIUM, DateFormat.FULL);
0129:                if (!fmtA.equals(fmtB))
0130:                    errln("FAIL");
0131:            }
0132:
0133:            /**
0134:             * Test the parsing of 2-digit years.
0135:             */
0136:            public void TestTwoDigitYearDSTParse() {
0137:
0138:                SimpleDateFormat fullFmt = new SimpleDateFormat(
0139:                        "EEE MMM dd HH:mm:ss.SSS zzz yyyy G");
0140:                SimpleDateFormat fmt = new SimpleDateFormat(
0141:                        "dd-MMM-yy h:mm:ss 'o''clock' a z", Locale.ENGLISH);
0142:                String s = "03-Apr-04 2:20:47 o'clock AM PST";
0143:
0144:                /*
0145:                 * SimpleDateFormat(pattern, locale) Construct a SimpleDateDateFormat using
0146:                 * the given pattern, the locale and using the TimeZone.getDefault();
0147:                 * So it need to add the timezone offset on hour field. 
0148:                 * ps. the Method Calendar.getTime() used by SimpleDateFormat.parse() always 
0149:                 * return Date value with TimeZone.getDefault() [Richard/GCL]
0150:                 */
0151:
0152:                TimeZone defaultTZ = TimeZone.getDefault();
0153:                TimeZone PST = TimeZone.getTimeZone("PST");
0154:                int defaultOffset = defaultTZ.getRawOffset();
0155:                int PSTOffset = PST.getRawOffset();
0156:                int hour = 2 + (defaultOffset - PSTOffset) / (60 * 60 * 1000);
0157:                // hour is the expected hour of day, in units of seconds
0158:                hour = ((hour < 0) ? hour + 24 : hour) * 60 * 60;
0159:                try {
0160:                    Date d = fmt.parse(s);
0161:                    Calendar cal = Calendar.getInstance();
0162:                    cal.setTime(d);
0163:                    //DSTOffset
0164:                    hour += defaultTZ.inDaylightTime(d) ? 1 : 0;
0165:
0166:                    logln(s + " P> " + ((DateFormat) fullFmt).format(d));
0167:                    // hr is the actual hour of day, in units of seconds
0168:                    // adjust for DST
0169:                    int hr = cal.get(Calendar.HOUR_OF_DAY) * 60 * 60
0170:                            - cal.get(Calendar.DST_OFFSET) / 1000;
0171:                    if (hr != hour)
0172:                        errln("FAIL: Hour (-DST) = " + hr / (60 * 60.0)
0173:                                + "; expected " + hour / (60 * 60.0));
0174:                } catch (ParseException e) {
0175:                    errln("Parse Error:" + e.getMessage());
0176:                }
0177:
0178:            }
0179:
0180:            /**
0181:             * Verify that returned field position indices are correct.
0182:             */
0183:            public void TestFieldPosition() {
0184:                int i, j, exp;
0185:                StringBuffer buf = new StringBuffer();
0186:
0187:                // Verify data
0188:                if (VersionInfo.ICU_VERSION.compareTo(VersionInfo.getInstance(
0189:                        3, 7)) >= 0) {
0190:                    DateFormatSymbols rootSyms = new DateFormatSymbols(
0191:                            new Locale("", "", ""));
0192:                    assertEquals("patternChars", PATTERN_CHARS, rootSyms
0193:                            .getLocalPatternChars());
0194:                }
0195:
0196:                assertTrue("DATEFORMAT_FIELD_NAMES",
0197:                        DATEFORMAT_FIELD_NAMES.length == DateFormat.FIELD_COUNT);
0198:                if (DateFormat.FIELD_COUNT != PATTERN_CHARS.length()) {
0199:                    errln("Did not get the correct value for DateFormat.FIELD_COUNT. Expected:  "
0200:                            + PATTERN_CHARS.length());
0201:                }
0202:
0203:                // Create test formatters
0204:                final int COUNT = 4;
0205:                DateFormat[] dateFormats = new DateFormat[COUNT];
0206:                dateFormats[0] = DateFormat.getDateTimeInstance(
0207:                        DateFormat.FULL, DateFormat.FULL, Locale.US);
0208:                dateFormats[1] = DateFormat.getDateTimeInstance(
0209:                        DateFormat.FULL, DateFormat.FULL, Locale.FRANCE);
0210:                // Make the pattern "G y M d..."
0211:                buf.append(PATTERN_CHARS);
0212:                for (j = buf.length() - 1; j >= 0; --j)
0213:                    buf.insert(j, ' ');
0214:                dateFormats[2] = new SimpleDateFormat(buf.toString(), Locale.US);
0215:                // Make the pattern "GGGG yyyy MMMM dddd..."
0216:                for (j = buf.length() - 1; j >= 0; j -= 2) {
0217:                    for (i = 0; i < 3; ++i) {
0218:                        buf.insert(j, buf.charAt(j));
0219:                    }
0220:                }
0221:                dateFormats[3] = new SimpleDateFormat(buf.toString(), Locale.US);
0222:
0223:                Date aug13 = new Date((long) 871508052513.0);
0224:
0225:                // Expected output field values for above DateFormats on aug13
0226:                // Fields are given in order of DateFormat field number
0227:                final String EXPECTED[] = { "", "1997", "August", "13", "", "",
0228:                        "34", "12", "", "Wednesday", "", "", "", "", "PM", "2",
0229:                        "", "", "", "", "", "", "", "", "PT", "", "", "", "",
0230:
0231:                        "", "1997", "ao\u00FBt", "13", "", "14", "34", "", "",
0232:                        "mercredi", "", "", "", "", "", "", "",
0233:                        "HAP (\u00C9UA)", "", "", "", "", "", "", "", "", "",
0234:                        "", "",
0235:
0236:                        "AD", "1997", "8", "13", "14", "14", "34", "12", "5",
0237:                        "Wed", "225", "2", "33", "3", "PM", "2", "2", "PDT",
0238:                        "1997", "4", "1997", "2450674", "52452513", "-0700",
0239:                        "PT", "4", "8", "3", "3",
0240:
0241:                        "Anno Domini", "1997", "August", "0013", "0014",
0242:                        "0014", "0034", "0012", "5130", "Wednesday", "0225",
0243:                        "0002", "0033", "0003", "PM", "0002", "0002",
0244:                        "Pacific Daylight Time", "1997", "0004", "1997",
0245:                        "2450674", "52452513", "GMT-07:00", "Pacific Time",
0246:                        "Wednesday", "August", "3rd quarter", "3rd quarter", };
0247:
0248:                assertTrue("data size", EXPECTED.length == COUNT
0249:                        * DateFormat.FIELD_COUNT);
0250:
0251:                TimeZone PT = TimeZone.getTimeZone("America/Los_Angeles");
0252:                for (j = 0, exp = 0; j < COUNT; ++j) {
0253:                    //  String str;
0254:                    DateFormat df = dateFormats[j];
0255:                    df.setTimeZone(PT);
0256:                    logln(" Pattern = " + ((SimpleDateFormat) df).toPattern());
0257:                    try {
0258:                        logln("  Result = " + df.format(aug13));
0259:                    } catch (Exception e) {
0260:                        errln("FAIL: " + e);
0261:                        e.printStackTrace();
0262:                        continue;
0263:                    }
0264:
0265:                    for (i = 0; i < DateFormat.FIELD_COUNT; ++i, ++exp) {
0266:                        FieldPosition pos = new FieldPosition(i);
0267:                        buf.setLength(0);
0268:                        df.format(aug13, buf, pos);
0269:                        String field = buf.substring(pos.getBeginIndex(), pos
0270:                                .getEndIndex());
0271:                        assertEquals("field #" + i + " "
0272:                                + DATEFORMAT_FIELD_NAMES[i], EXPECTED[exp],
0273:                                field);
0274:                    }
0275:                }
0276:            }
0277:
0278:            /**
0279:             * This MUST be kept in sync with DateFormatSymbols.patternChars.
0280:             */
0281:            static final String PATTERN_CHARS = "GyMdkHmsSEDFwWahKzYeugAZvcLQq";
0282:
0283:            /**
0284:             * A list of the names of all the fields in DateFormat.
0285:             * This MUST be kept in sync with DateFormat.
0286:             */
0287:            static final String DATEFORMAT_FIELD_NAMES[] = { "ERA_FIELD",
0288:                    "YEAR_FIELD", "MONTH_FIELD", "DATE_FIELD",
0289:                    "HOUR_OF_DAY1_FIELD", "HOUR_OF_DAY0_FIELD", "MINUTE_FIELD",
0290:                    "SECOND_FIELD", "MILLISECOND_FIELD", "DAY_OF_WEEK_FIELD",
0291:                    "DAY_OF_YEAR_FIELD", "DAY_OF_WEEK_IN_MONTH_FIELD",
0292:                    "WEEK_OF_YEAR_FIELD", "WEEK_OF_MONTH_FIELD", "AM_PM_FIELD",
0293:                    "HOUR1_FIELD", "HOUR0_FIELD", "TIMEZONE_FIELD",
0294:                    "YEAR_WOY_FIELD", "DOW_LOCAL_FIELD", "EXTENDED_YEAR_FIELD",
0295:                    "JULIAN_DAY_FIELD", "MILLISECONDS_IN_DAY_FIELD",
0296:                    "TIMEZONE_RFC_FIELD", "GENERIC_TIMEZONE_FIELD",
0297:                    "STAND_ALONE_DAY_FIELD", "STAND_ALONE_MONTH_FIELD",
0298:                    "QUARTER_FIELD", "STAND_ALONE_QUARTER_FIELD", };
0299:
0300:            /**
0301:             * General parse/format tests.  Add test cases as needed.
0302:             */
0303:            public void TestGeneral() {
0304:
0305:                String DATA[] = {
0306:                        "yyyy MM dd HH:mm:ss.SSS",
0307:
0308:                        // Milliseconds are left-justified, since they format as fractions of a second
0309:                        // Both format and parse should round HALF_UP
0310:                        "y/M/d H:mm:ss.S", "fp", "2004 03 10 16:36:31.567",
0311:                        "2004/3/10 16:36:31.6", "2004 03 10 16:36:31.600",
0312:                        "y/M/d H:mm:ss.SS", "fp", "2004 03 10 16:36:31.567",
0313:                        "2004/3/10 16:36:31.57", "2004 03 10 16:36:31.570",
0314:                        "y/M/d H:mm:ss.SSS", "F", "2004 03 10 16:36:31.567",
0315:                        "2004/3/10 16:36:31.567", "y/M/d H:mm:ss.SSSS", "pf",
0316:                        "2004/3/10 16:36:31.5679", "2004 03 10 16:36:31.568",
0317:                        "2004/3/10 16:36:31.5680", };
0318:                expect(DATA, new Locale("en", "", ""));
0319:            }
0320:
0321:            public void TestGenericTime() {
0322:
0323:                // any zone pattern should parse any zone
0324:                Locale en = new Locale("en", "", "");
0325:                String ZDATA[] = {
0326:                        "yyyy MM dd HH:mm zzz",
0327:                        // round trip
0328:                        "y/M/d H:mm zzzz",
0329:                        "F",
0330:                        "2004 01 01 01:00 PST",
0331:                        "2004/1/1 1:00 Pacific Standard Time",
0332:                        "y/M/d H:mm zzz",
0333:                        "F",
0334:                        "2004 01 01 01:00 PST",
0335:                        "2004/1/1 1:00 PST",
0336:                        "y/M/d H:mm vvvv",
0337:                        "F",
0338:                        "2004 01 01 01:00 PST",
0339:                        "2004/1/1 1:00 Pacific Time",
0340:                        "y/M/d H:mm vvv",
0341:                        "F",
0342:                        "2004 01 01 01:00 PST",
0343:                        "2004/1/1 1:00 PT",
0344:                        // non-generic timezone string influences dst offset even if wrong for date/time
0345:                        "y/M/d H:mm zzz",
0346:                        "pf",
0347:                        "2004/1/1 1:00 PDT",
0348:                        "2004 01 01 01:00 PDT",
0349:                        "2004/1/1 0:00 PST",
0350:                        "y/M/d H:mm vvvv",
0351:                        "pf",
0352:                        "2004/1/1 1:00 PDT",
0353:                        "2004 01 01 01:00 PDT",
0354:                        "2004/1/1 0:00 Pacific Time",
0355:                        "y/M/d H:mm zzz",
0356:                        "pf",
0357:                        "2004/7/1 1:00 PST",
0358:                        "2004 07 01 02:00 PDT",
0359:                        "2004/7/1 2:00 PDT",
0360:                        "y/M/d H:mm vvvv",
0361:                        "pf",
0362:                        "2004/7/1 1:00 PST",
0363:                        "2004 07 01 02:00 PDT",
0364:                        "2004/7/1 2:00 Pacific Time",
0365:                        // generic timezone generates dst offset appropriate for local time
0366:                        "y/M/d H:mm zzz",
0367:                        "pf",
0368:                        "2004/1/1 1:00 PT",
0369:                        "2004 01 01 01:00 PST",
0370:                        "2004/1/1 1:00 PST",
0371:                        "y/M/d H:mm vvvv",
0372:                        "pf",
0373:                        "2004/1/1 1:00 PT",
0374:                        "2004 01 01 01:00 PST",
0375:                        "2004/1/1 1:00 Pacific Time",
0376:                        "y/M/d H:mm zzz",
0377:                        "pf",
0378:                        "2004/7/1 1:00 PT",
0379:                        "2004 07 01 01:00 PDT",
0380:                        "2004/7/1 1:00 PDT",
0381:                        "y/M/d H:mm vvvv",
0382:                        "pf",
0383:                        "2004/7/1 1:00 PT",
0384:                        "2004 07 01 01:00 PDT",
0385:                        "2004/7/1 1:00 Pacific Time",
0386:                        // daylight savings time transition edge cases.
0387:                        // time to parse does not really exist, PT interpreted as earlier time
0388:                        "y/M/d H:mm zzz", "pf",
0389:                        "2005/4/3 2:30 PT",
0390:                        "2005 04 03 01:30 PST",
0391:                        "2005/4/3 1:30 PST",
0392:                        "y/M/d H:mm zzz",
0393:                        "pf",
0394:                        "2005/4/3 2:30 PST",
0395:                        "2005 04 03 03:30 PDT",
0396:                        "2005/4/3 3:30 PDT",
0397:                        "y/M/d H:mm zzz",
0398:                        "pf",
0399:                        "2005/4/3 2:30 PDT",
0400:                        "2005 04 03 01:30 PST",
0401:                        "2005/4/3 1:30 PST",
0402:                        "y/M/d H:mm v",
0403:                        "pf",
0404:                        "2005/4/3 2:30 PT",
0405:                        "2005 04 03 01:30 PST",
0406:                        "2005/4/3 1:30 PT",
0407:                        "y/M/d H:mm v",
0408:                        "pf",
0409:                        "2005/4/3 2:30 PST",
0410:                        "2005 04 03 03:30 PDT",
0411:                        "2005/4/3 3:30 PT",
0412:                        "y/M/d H:mm v",
0413:                        "pf",
0414:                        "2005/4/3 2:30 PDT",
0415:                        "2005 04 03 01:30 PST",
0416:                        "2005/4/3 1:30 PT",
0417:                        "y/M/d H:mm",
0418:                        "pf",
0419:                        "2005/4/3 2:30",
0420:                        "2005 04 03 01:30 PST",
0421:                        "2005/4/3 1:30",
0422:                        // time to parse is ambiguous, PT interpreted as earlier time (?)
0423:                        "y/M/d H:mm zzz", "pf", "2005/4/3 1:30 PT",
0424:                        "2005 04 03 01:30 PST", "2005/4/3 1:30 PST",
0425:                        "y/M/d H:mm v", "pf", "2005/4/3 1:30 PT",
0426:                        "2005 04 03  01:30 PST", "2005/4/3 1:30 PT",
0427:                        "y/M/d H:mm", "pf", "2005/4/3 1:30 PT",
0428:                        "2005 04 03 01:30 PST", "2005/4/3 1:30",
0429:
0430:                        "y/M/d H:mm zzz", "pf", "2004/10/31 1:30 PT",
0431:                        "2004 10 31 01:30 PST", "2004/10/31 1:30 PST",
0432:                        "y/M/d H:mm zzz", "pf", "2004/10/31 1:30 PST",
0433:                        "2004 10 31 01:30 PST", "2004/10/31 1:30 PST",
0434:                        "y/M/d H:mm zzz", "pf", "2004/10/31 1:30 PDT",
0435:                        "2004 10 31 01:30 PDT", "2004/10/31 1:30 PDT",
0436:                        "y/M/d H:mm v", "pf", "2004/10/31 1:30 PT",
0437:                        "2004 10 31 01:30 PST", "2004/10/31 1:30 PT",
0438:                        "y/M/d H:mm v", "pf", "2004/10/31 1:30 PST",
0439:                        "2004 10 31 01:30 PST", "2004/10/31 1:30 PT",
0440:                        "y/M/d H:mm v", "pf", "2004/10/31 1:30 PDT",
0441:                        "2004 10 31 01:30 PDT", "2004/10/31 1:30 PT",
0442:                        "y/M/d H:mm", "pf", "2004/10/31 1:30",
0443:                        "2004 10 31 01:30 PST", "2004/10/31 1:30",
0444:
0445:                        "y/M/d H:mm vvvv", "pf",
0446:                        "2004/10/31 1:30 Buenos Aires (Argentina)",
0447:                        "2004 10 30 21:30 PDT",
0448:                        "2004/10/31 1:30 Buenos Aires (Argentina)", };
0449:                expect(ZDATA, en);
0450:
0451:                logln("cross format/parse tests");
0452:                final String basepat = "yy/MM/dd H:mm ";
0453:                final SimpleDateFormat[] formats = {
0454:                        new SimpleDateFormat(basepat + "vvv", en),
0455:                        new SimpleDateFormat(basepat + "vvvv", en),
0456:                        new SimpleDateFormat(basepat + "zzz", en),
0457:                        new SimpleDateFormat(basepat + "zzzz", en) };
0458:
0459:                final SimpleDateFormat univ = new SimpleDateFormat(
0460:                        "yyyy MM dd HH:mm zzz", en);
0461:                final String[] times = { "2004 01 02 03:04 PST",
0462:                        "2004 07 08 09:10 PDT" };
0463:                for (int i = 0; i < times.length; ++i) {
0464:                    try {
0465:                        Date d = univ.parse(times[i]);
0466:                        logln("time: " + d);
0467:                        for (int j = 0; j < formats.length; ++j) {
0468:                            String test = formats[j].format(d);
0469:                            logln("test: '" + test + "'");
0470:                            for (int k = 0; k < formats.length; ++k) {
0471:                                try {
0472:                                    Date t = formats[k].parse(test);
0473:                                    if (!d.equals(t)) {
0474:                                        errln("format "
0475:                                                + k
0476:                                                + " incorrectly parsed output of format "
0477:                                                + j + " (" + test
0478:                                                + "), returned " + t
0479:                                                + " instead of " + d);
0480:                                    } else {
0481:                                        logln("format " + k + " parsed ok");
0482:                                    }
0483:                                } catch (ParseException e) {
0484:                                    errln("format "
0485:                                            + k
0486:                                            + " could not parse output of format "
0487:                                            + j + " (" + test + ")");
0488:                                }
0489:                            }
0490:                        }
0491:                    } catch (ParseException e) {
0492:                        errln("univ could not parse: " + times[i]);
0493:                    }
0494:                }
0495:
0496:            }
0497:
0498:            public void TestGenericTimeZoneOrder() {
0499:                // generic times should parse the same no matter what the placement of the time zone string
0500:                // should work for standard and daylight times
0501:
0502:                String XDATA[] = {
0503:                        "yyyy MM dd HH:mm zzz",
0504:                        // standard time, explicit daylight/standard
0505:                        "y/M/d H:mm zzz",
0506:                        "pf",
0507:                        "2004/1/1 1:00 PT",
0508:                        "2004 01 01 01:00 PST",
0509:                        "2004/1/1 1:00 PST",
0510:                        "y/M/d zzz H:mm",
0511:                        "pf",
0512:                        "2004/1/1 PT 1:00",
0513:                        "2004 01 01 01:00 PST",
0514:                        "2004/1/1 PST 1:00",
0515:                        "zzz y/M/d H:mm",
0516:                        "pf",
0517:                        "PT 2004/1/1 1:00",
0518:                        "2004 01 01 01:00 PST",
0519:                        "PST 2004/1/1 1:00",
0520:
0521:                        // standard time, generic
0522:                        "y/M/d H:mm vvvv",
0523:                        "pf",
0524:                        "2004/1/1 1:00 PT",
0525:                        "2004 01 01 01:00 PST",
0526:                        "2004/1/1 1:00 Pacific Time",
0527:                        "y/M/d vvvv H:mm",
0528:                        "pf",
0529:                        "2004/1/1 PT 1:00",
0530:                        "2004 01 01 01:00 PST",
0531:                        "2004/1/1 Pacific Time 1:00",
0532:                        "vvvv y/M/d H:mm",
0533:                        "pf",
0534:                        "PT 2004/1/1 1:00",
0535:                        "2004 01 01 01:00 PST",
0536:                        "Pacific Time 2004/1/1 1:00",
0537:
0538:                        // daylight time, explicit daylight/standard
0539:                        "y/M/d H:mm zzz", "pf", "2004/7/1 1:00 PT",
0540:                        "2004 07 01 01:00 PDT", "2004/7/1 1:00 PDT",
0541:                        "y/M/d zzz H:mm", "pf", "2004/7/1 PT 1:00",
0542:                        "2004 07 01 01:00 PDT",
0543:                        "2004/7/1 PDT 1:00",
0544:                        "zzz y/M/d H:mm",
0545:                        "pf",
0546:                        "PT 2004/7/1 1:00",
0547:                        "2004 07 01 01:00 PDT",
0548:                        "PDT 2004/7/1 1:00",
0549:
0550:                        // daylight time, generic
0551:                        "y/M/d H:mm vvvv", "pf", "2004/7/1 1:00 PT",
0552:                        "2004 07 01 01:00 PDT", "2004/7/1 1:00 Pacific Time",
0553:                        "y/M/d vvvv H:mm", "pf", "2004/7/1 PT 1:00",
0554:                        "2004 07 01 01:00 PDT", "2004/7/1 Pacific Time 1:00",
0555:                        "vvvv y/M/d H:mm", "pf", "PT 2004/7/1 1:00",
0556:                        "2004 07 01 01:00 PDT", "Pacific Time 2004/7/1 1:00", };
0557:                Locale en = new Locale("en", "", "");
0558:                expect(XDATA, en);
0559:            }
0560:
0561:            public void TestTimeZoneDisplayName() {
0562:                Calendar cal = new GregorianCalendar();
0563:                long julyDate = new Date(2004, 6, 15).getTime();
0564:                long januaryDate = new Date(2004, 0, 15).getTime();
0565:
0566:                for (int i = 0; i < fallbackTests.length; ++i) {
0567:                    String[] info = fallbackTests[i];
0568:                    logln(info[0] + ";" + info[1] + ";" + info[2] + ";"
0569:                            + info[3]);
0570:
0571:                    ULocale l = new ULocale(info[0]);
0572:                    TimeZone tz = TimeZone.getTimeZone(info[1]);
0573:                    long time = info[2].equals("2004-07-15T00:00:00Z") ? julyDate
0574:                            : januaryDate;
0575:                    SimpleDateFormat fmt = new SimpleDateFormat(info[3], l);
0576:                    cal.setTimeInMillis(time);
0577:                    cal.setTimeZone(tz);
0578:                    String result = fmt.format(cal);
0579:                    if (!result.equals(info[4])) {
0580:                        errln(info[0] + ";" + info[1] + ";" + info[2] + ";"
0581:                                + info[3] + " expected: '" + info[4]
0582:                                + "' but got: '" + result + "'");
0583:                    }
0584:                }
0585:            }
0586:
0587:            private static final String[][] fallbackTests = {
0588:                    { "en", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z",
0589:                            "-0800", "-8:00" },
0590:                    { "en", "America/Los_Angeles", "2004-01-15T00:00:00Z",
0591:                            "ZZZZ", "GMT-08:00", "-8:00" },
0592:                    { "en", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z",
0593:                            "PST", "America/Los_Angeles" },
0594:                    { "en", "America/Los_Angeles", "2004-01-15T00:00:00Z",
0595:                            "zzzz", "Pacific Standard Time",
0596:                            "America/Los_Angeles" },
0597:                    { "en", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z",
0598:                            "-0700", "-7:00" },
0599:                    { "en", "America/Los_Angeles", "2004-07-15T00:00:00Z",
0600:                            "ZZZZ", "GMT-07:00", "-7:00" },
0601:                    { "en", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z",
0602:                            "PDT", "America/Los_Angeles" },
0603:                    { "en", "America/Los_Angeles", "2004-07-15T00:00:00Z",
0604:                            "zzzz", "Pacific Daylight Time",
0605:                            "America/Los_Angeles" },
0606:                    { "en", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v",
0607:                            "PT", "America/Los_Angeles" },
0608:                    { "en", "America/Los_Angeles", "2004-07-15T00:00:00Z",
0609:                            "vvvv", "Pacific Time", "America/Los_Angeles" },
0610:                    { "en_GB", "America/Los_Angeles", "2004-01-15T12:00:00Z",
0611:                            "z", "PST", "America/Los_Angeles" },
0612:
0613:                    { "en", "America/Argentina/Buenos_Aires",
0614:                            "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
0615:                    { "en", "America/Argentina/Buenos_Aires",
0616:                            "2004-01-15T00:00:00Z", "ZZZZ", "GMT-03:00",
0617:                            "-3:00" },
0618:                    { "en", "America/Argentina/Buenos_Aires",
0619:                            "2004-01-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
0620:                    { "en", "America/Argentina/Buenos_Aires",
0621:                            "2004-01-15T00:00:00Z", "zzzz", "GMT-03:00",
0622:                            "-3:00" },
0623:                    { "en", "America/Argentina/Buenos_Aires",
0624:                            "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
0625:                    { "en", "America/Argentina/Buenos_Aires",
0626:                            "2004-07-15T00:00:00Z", "ZZZZ", "GMT-03:00",
0627:                            "-3:00" },
0628:                    { "en", "America/Argentina/Buenos_Aires",
0629:                            "2004-07-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
0630:                    { "en", "America/Argentina/Buenos_Aires",
0631:                            "2004-07-15T00:00:00Z", "zzzz", "GMT-03:00",
0632:                            "-3:00" },
0633:                    { "en", "America/Argentina/Buenos_Aires",
0634:                            "2004-07-15T00:00:00Z", "v",
0635:                            "Buenos Aires (Argentina)", "America/Buenos_Aires" },
0636:                    { "en", "America/Argentina/Buenos_Aires",
0637:                            "2004-07-15T00:00:00Z", "vvvv",
0638:                            "Buenos Aires (Argentina)", "America/Buenos_Aires" },
0639:
0640:                    { "en", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
0641:                            "Z", "-0300", "-3:00" },
0642:                    { "en", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
0643:                            "ZZZZ", "GMT-03:00", "-3:00" },
0644:                    { "en", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
0645:                            "z", "GMT-03:00", "-3:00" },
0646:                    { "en", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
0647:                            "zzzz", "GMT-03:00", "-3:00" },
0648:                    { "en", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
0649:                            "Z", "-0300", "-3:00" },
0650:                    { "en", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
0651:                            "ZZZZ", "GMT-03:00", "-3:00" },
0652:                    { "en", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
0653:                            "z", "GMT-03:00", "-3:00" },
0654:                    { "en", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
0655:                            "zzzz", "GMT-03:00", "-3:00" },
0656:                    { "en", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
0657:                            "v", "Buenos Aires (Argentina)",
0658:                            "America/Buenos_Aires" },
0659:                    { "en", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
0660:                            "vvvv", "Buenos Aires (Argentina)",
0661:                            "America/Buenos_Aires" },
0662:
0663:                    { "en", "America/Havana", "2004-01-15T00:00:00Z", "Z",
0664:                            "-0500", "-5:00" },
0665:                    { "en", "America/Havana", "2004-01-15T00:00:00Z", "ZZZZ",
0666:                            "GMT-05:00", "-5:00" },
0667:                    { "en", "America/Havana", "2004-01-15T00:00:00Z", "z",
0668:                            "GMT-05:00", "-5:00" },
0669:                    { "en", "America/Havana", "2004-01-15T00:00:00Z", "zzzz",
0670:                            "GMT-05:00", "-5:00" },
0671:                    { "en", "America/Havana", "2004-07-15T00:00:00Z", "Z",
0672:                            "-0400", "-4:00" },
0673:                    { "en", "America/Havana", "2004-07-15T00:00:00Z", "ZZZZ",
0674:                            "GMT-04:00", "-4:00" },
0675:                    { "en", "America/Havana", "2004-07-15T00:00:00Z", "z",
0676:                            "GMT-04:00", "-4:00" },
0677:                    { "en", "America/Havana", "2004-07-15T00:00:00Z", "zzzz",
0678:                            "GMT-04:00", "-4:00" },
0679:                    { "en", "America/Havana", "2004-07-15T00:00:00Z", "v",
0680:                            "Cuba", "America/Havana" },
0681:                    { "en", "America/Havana", "2004-07-15T00:00:00Z", "vvvv",
0682:                            "Cuba", "America/Havana" },
0683:
0684:                    { "en", "Australia/ACT", "2004-01-15T00:00:00Z", "Z",
0685:                            "+1100", "+11:00" },
0686:                    { "en", "Australia/ACT", "2004-01-15T00:00:00Z", "ZZZZ",
0687:                            "GMT+11:00", "+11:00" },
0688:                    { "en", "Australia/ACT", "2004-01-15T00:00:00Z", "z",
0689:                            "GMT+11:00", "+11:00" },
0690:                    { "en", "Australia/ACT", "2004-01-15T00:00:00Z", "zzzz",
0691:                            "GMT+11:00", "+11:00" },
0692:                    { "en", "Australia/ACT", "2004-07-15T00:00:00Z", "Z",
0693:                            "+1000", "+10:00" },
0694:                    { "en", "Australia/ACT", "2004-07-15T00:00:00Z", "ZZZZ",
0695:                            "GMT+10:00", "+10:00" },
0696:                    { "en", "Australia/ACT", "2004-07-15T00:00:00Z", "z",
0697:                            "GMT+10:00", "+10:00" },
0698:                    { "en", "Australia/ACT", "2004-07-15T00:00:00Z", "zzzz",
0699:                            "GMT+10:00", "+10:00" },
0700:                    { "en", "Australia/ACT", "2004-07-15T00:00:00Z", "v",
0701:                            "Sydney (Australia)", "Australia/Sydney" },
0702:                    { "en", "Australia/ACT", "2004-07-15T00:00:00Z", "vvvv",
0703:                            "Sydney (Australia)", "Australia/Sydney" },
0704:
0705:                    { "en", "Australia/Sydney", "2004-01-15T00:00:00Z", "Z",
0706:                            "+1100", "+11:00" },
0707:                    { "en", "Australia/Sydney", "2004-01-15T00:00:00Z", "ZZZZ",
0708:                            "GMT+11:00", "+11:00" },
0709:                    { "en", "Australia/Sydney", "2004-01-15T00:00:00Z", "z",
0710:                            "GMT+11:00", "+11:00" },
0711:                    { "en", "Australia/Sydney", "2004-01-15T00:00:00Z", "zzzz",
0712:                            "GMT+11:00", "+11:00" },
0713:                    { "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "Z",
0714:                            "+1000", "+10:00" },
0715:                    { "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "ZZZZ",
0716:                            "GMT+10:00", "+10:00" },
0717:                    { "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "z",
0718:                            "GMT+10:00", "+10:00" },
0719:                    { "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "zzzz",
0720:                            "GMT+10:00", "+10:00" },
0721:                    { "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "v",
0722:                            "Sydney (Australia)", "Australia/Sydney" },
0723:                    { "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "vvvv",
0724:                            "Sydney (Australia)", "Australia/Sydney" },
0725:
0726:                    { "en", "Europe/London", "2004-01-15T00:00:00Z", "Z",
0727:                            "+0000", "+0:00" },
0728:                    { "en", "Europe/London", "2004-01-15T00:00:00Z", "ZZZZ",
0729:                            "GMT+00:00", "+0:00" },
0730:                    { "en", "Europe/London", "2004-01-15T00:00:00Z", "z",
0731:                            "GMT", "+0:00" },
0732:                    { "en", "Europe/London", "2004-01-15T00:00:00Z", "zzzz",
0733:                            "Greenwich Mean Time", "+0:00" },
0734:                    { "en", "Europe/London", "2004-07-15T00:00:00Z", "Z",
0735:                            "+0100", "+1:00" },
0736:                    { "en", "Europe/London", "2004-07-15T00:00:00Z", "ZZZZ",
0737:                            "GMT+01:00", "+1:00" },
0738:                    { "en", "Europe/London", "2004-07-15T00:00:00Z", "z",
0739:                            "BST", "Europe/London" },
0740:                    { "en", "Europe/London", "2004-07-15T00:00:00Z", "zzzz",
0741:                            "British Summer Time", "Europe/London" },
0742:                    // icu en.txt has exemplar city for this time zone
0743:                    { "en", "Europe/London", "2004-07-15T00:00:00Z", "v",
0744:                            "United Kingdom", "Europe/London" },
0745:                    { "en", "Europe/London", "2004-07-15T00:00:00Z", "vvvv",
0746:                            "United Kingdom", "Europe/London" },
0747:
0748:                    { "en", "Etc/GMT+3", "2004-01-15T00:00:00Z", "Z", "-0300",
0749:                            "-3:00" },
0750:                    { "en", "Etc/GMT+3", "2004-01-15T00:00:00Z", "ZZZZ",
0751:                            "GMT-03:00", "-3:00" },
0752:                    { "en", "Etc/GMT+3", "2004-01-15T00:00:00Z", "z",
0753:                            "GMT-03:00", "-3:00" },
0754:                    { "en", "Etc/GMT+3", "2004-01-15T00:00:00Z", "zzzz",
0755:                            "GMT-03:00", "-3:00" },
0756:                    { "en", "Etc/GMT+3", "2004-07-15T00:00:00Z", "Z", "-0300",
0757:                            "-3:00" },
0758:                    { "en", "Etc/GMT+3", "2004-07-15T00:00:00Z", "ZZZZ",
0759:                            "GMT-03:00", "-3:00" },
0760:                    { "en", "Etc/GMT+3", "2004-07-15T00:00:00Z", "z",
0761:                            "GMT-03:00", "-3:00" },
0762:                    { "en", "Etc/GMT+3", "2004-07-15T00:00:00Z", "zzzz",
0763:                            "GMT-03:00", "-3:00" },
0764:                    { "en", "Etc/GMT+3", "2004-07-15T00:00:00Z", "v",
0765:                            "GMT-03:00", "-3:00" },
0766:                    { "en", "Etc/GMT+3", "2004-07-15T00:00:00Z", "vvvv",
0767:                            "GMT-03:00", "-3:00" },
0768:
0769:                    // JB#5150
0770:                    { "en", "Asia/Calcutta", "2004-01-15T00:00:00Z", "Z",
0771:                            "+0530", "+5:30" },
0772:                    { "en", "Asia/Calcutta", "2004-01-15T00:00:00Z", "ZZZZ",
0773:                            "GMT+05:30", "+5:30" },
0774:                    { "en", "Asia/Calcutta", "2004-01-15T00:00:00Z", "z",
0775:                            "GMT+05:30", "+5:30" },
0776:                    { "en", "Asia/Calcutta", "2004-01-15T00:00:00Z", "zzzz",
0777:                            "GMT+05:30", "+5:30" },
0778:                    { "en", "Asia/Calcutta", "2004-07-15T00:00:00Z", "Z",
0779:                            "+0530", "+5:30" },
0780:                    { "en", "Asia/Calcutta", "2004-07-15T00:00:00Z", "ZZZZ",
0781:                            "GMT+05:30", "+5:30" },
0782:                    { "en", "Asia/Calcutta", "2004-07-15T00:00:00Z", "z",
0783:                            "GMT+05:30", "+05:30" },
0784:                    { "en", "Asia/Calcutta", "2004-07-15T00:00:00Z", "zzzz",
0785:                            "GMT+05:30", "+5:30" },
0786:                    { "en", "Asia/Calcutta", "2004-07-15T00:00:00Z", "v",
0787:                            "India", "Asia/Calcutta" },
0788:                    { "en", "Asia/Calcutta", "2004-07-15T00:00:00Z", "vvvv",
0789:                            "India", "Asia/Calcutta" },
0790:
0791:                    // ==========
0792:
0793:                    { "de", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z",
0794:                            "-0800", "-8:00" },
0795:                    { "de", "America/Los_Angeles", "2004-01-15T00:00:00Z",
0796:                            "ZZZZ", "GMT-08:00", "-8:00" },
0797:                    { "de", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z",
0798:                            "GMT-08:00", "-8:00" },
0799:                    { "de", "America/Los_Angeles", "2004-01-15T00:00:00Z",
0800:                            "zzzz", "GMT-08:00", "-8:00" },
0801:                    { "de", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z",
0802:                            "-0700", "-7:00" },
0803:                    { "de", "America/Los_Angeles", "2004-07-15T00:00:00Z",
0804:                            "ZZZZ", "GMT-07:00", "-7:00" },
0805:                    { "de", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z",
0806:                            "GMT-07:00", "-7:00" },
0807:                    { "de", "America/Los_Angeles", "2004-07-15T00:00:00Z",
0808:                            "zzzz", "GMT-07:00", "-7:00" },
0809:                    { "de", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v",
0810:                            "Los Angeles (Vereinigte Staaten)",
0811:                            "America/Los_Angeles" },
0812:                    { "de", "America/Los_Angeles", "2004-07-15T00:00:00Z",
0813:                            "vvvv", "Los Angeles (Vereinigte Staaten)",
0814:                            "America/Los_Angeles" },
0815:
0816:                    { "de", "America/Argentina/Buenos_Aires",
0817:                            "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
0818:                    { "de", "America/Argentina/Buenos_Aires",
0819:                            "2004-01-15T00:00:00Z", "ZZZZ", "GMT-03:00",
0820:                            "-3:00" },
0821:                    { "de", "America/Argentina/Buenos_Aires",
0822:                            "2004-01-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
0823:                    { "de", "America/Argentina/Buenos_Aires",
0824:                            "2004-01-15T00:00:00Z", "zzzz", "GMT-03:00",
0825:                            "-3:00" },
0826:                    { "de", "America/Argentina/Buenos_Aires",
0827:                            "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
0828:                    { "de", "America/Argentina/Buenos_Aires",
0829:                            "2004-07-15T00:00:00Z", "ZZZZ", "GMT-03:00",
0830:                            "-3:00" },
0831:                    { "de", "America/Argentina/Buenos_Aires",
0832:                            "2004-07-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
0833:                    { "de", "America/Argentina/Buenos_Aires",
0834:                            "2004-07-15T00:00:00Z", "zzzz", "GMT-03:00",
0835:                            "-3:00" },
0836:                    { "de", "America/Argentina/Buenos_Aires",
0837:                            "2004-07-15T00:00:00Z", "v",
0838:                            "Buenos Aires (Argentinien)",
0839:                            "America/Buenos_Aires" },
0840:                    { "de", "America/Argentina/Buenos_Aires",
0841:                            "2004-07-15T00:00:00Z", "vvvv",
0842:                            "Buenos Aires (Argentinien)",
0843:                            "America/Buenos_Aires" },
0844:
0845:                    { "de", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
0846:                            "Z", "-0300", "-3:00" },
0847:                    { "de", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
0848:                            "ZZZZ", "GMT-03:00", "-3:00" },
0849:                    { "de", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
0850:                            "z", "GMT-03:00", "-3:00" },
0851:                    { "de", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
0852:                            "zzzz", "GMT-03:00", "-3:00" },
0853:                    { "de", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
0854:                            "Z", "-0300", "-3:00" },
0855:                    { "de", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
0856:                            "ZZZZ", "GMT-03:00", "-3:00" },
0857:                    { "de", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
0858:                            "z", "GMT-03:00", "-3:00" },
0859:                    { "de", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
0860:                            "zzzz", "GMT-03:00", "-3:00" },
0861:                    { "de", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
0862:                            "v", "Buenos Aires (Argentinien)",
0863:                            "America/Buenos_Aires" },
0864:                    { "de", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
0865:                            "vvvv", "Buenos Aires (Argentinien)",
0866:                            "America/Buenos_Aires" },
0867:
0868:                    { "de", "America/Havana", "2004-01-15T00:00:00Z", "Z",
0869:                            "-0500", "-5:00" },
0870:                    { "de", "America/Havana", "2004-01-15T00:00:00Z", "ZZZZ",
0871:                            "GMT-05:00", "-5:00" },
0872:                    { "de", "America/Havana", "2004-01-15T00:00:00Z", "z",
0873:                            "GMT-05:00", "-5:00" },
0874:                    { "de", "America/Havana", "2004-01-15T00:00:00Z", "zzzz",
0875:                            "GMT-05:00", "-5:00" },
0876:                    { "de", "America/Havana", "2004-07-15T00:00:00Z", "Z",
0877:                            "-0400", "-4:00" },
0878:                    { "de", "America/Havana", "2004-07-15T00:00:00Z", "ZZZZ",
0879:                            "GMT-04:00", "-4:00" },
0880:                    { "de", "America/Havana", "2004-07-15T00:00:00Z", "z",
0881:                            "GMT-04:00", "-4:00" },
0882:                    { "de", "America/Havana", "2004-07-15T00:00:00Z", "zzzz",
0883:                            "GMT-04:00", "-4:00" },
0884:                    { "de", "America/Havana", "2004-07-15T00:00:00Z", "v",
0885:                            "Kuba", "America/Havana" },
0886:                    { "de", "America/Havana", "2004-07-15T00:00:00Z", "vvvv",
0887:                            "Kuba", "America/Havana" },
0888:                    // added to test proper fallback of country name
0889:                    { "de_CH", "America/Havana", "2004-07-15T00:00:00Z", "v",
0890:                            "Kuba", "America/Havana" },
0891:                    { "de_CH", "America/Havana", "2004-07-15T00:00:00Z",
0892:                            "vvvv", "Kuba", "America/Havana" },
0893:
0894:                    { "de", "Australia/ACT", "2004-01-15T00:00:00Z", "Z",
0895:                            "+1100", "+11:00" },
0896:                    { "de", "Australia/ACT", "2004-01-15T00:00:00Z", "ZZZZ",
0897:                            "GMT+11:00", "+11:00" },
0898:                    { "de", "Australia/ACT", "2004-01-15T00:00:00Z", "z",
0899:                            "GMT+11:00", "+11:00" },
0900:                    { "de", "Australia/ACT", "2004-01-15T00:00:00Z", "zzzz",
0901:                            "GMT+11:00", "+11:00" },
0902:                    { "de", "Australia/ACT", "2004-07-15T00:00:00Z", "Z",
0903:                            "+1000", "+10:00" },
0904:                    { "de", "Australia/ACT", "2004-07-15T00:00:00Z", "ZZZZ",
0905:                            "GMT+10:00", "+10:00" },
0906:                    { "de", "Australia/ACT", "2004-07-15T00:00:00Z", "z",
0907:                            "GMT+10:00", "+10:00" },
0908:                    { "de", "Australia/ACT", "2004-07-15T00:00:00Z", "zzzz",
0909:                            "GMT+10:00", "+10:00" },
0910:                    { "de", "Australia/ACT", "2004-07-15T00:00:00Z", "v",
0911:                            "Sydney (Australien)", "Australia/Sydney" },
0912:                    { "de", "Australia/ACT", "2004-07-15T00:00:00Z", "vvvv",
0913:                            "Sydney (Australien)", "Australia/Sydney" },
0914:
0915:                    { "de", "Australia/Sydney", "2004-01-15T00:00:00Z", "Z",
0916:                            "+1100", "+11:00" },
0917:                    { "de", "Australia/Sydney", "2004-01-15T00:00:00Z", "ZZZZ",
0918:                            "GMT+11:00", "+11:00" },
0919:                    { "de", "Australia/Sydney", "2004-01-15T00:00:00Z", "z",
0920:                            "GMT+11:00", "+11:00" },
0921:                    { "de", "Australia/Sydney", "2004-01-15T00:00:00Z", "zzzz",
0922:                            "GMT+11:00", "+11:00" },
0923:                    { "de", "Australia/Sydney", "2004-07-15T00:00:00Z", "Z",
0924:                            "+1000", "+10:00" },
0925:                    { "de", "Australia/Sydney", "2004-07-15T00:00:00Z", "ZZZZ",
0926:                            "GMT+10:00", "+10:00" },
0927:                    { "de", "Australia/Sydney", "2004-07-15T00:00:00Z", "z",
0928:                            "GMT+10:00", "+10:00" },
0929:                    { "de", "Australia/Sydney", "2004-07-15T00:00:00Z", "zzzz",
0930:                            "GMT+10:00", "+10:00" },
0931:                    { "de", "Australia/Sydney", "2004-07-15T00:00:00Z", "v",
0932:                            "Sydney (Australien)", "Australia/Sydney" },
0933:                    { "de", "Australia/Sydney", "2004-07-15T00:00:00Z", "vvvv",
0934:                            "Sydney (Australien)", "Australia/Sydney" },
0935:
0936:                    { "de", "Europe/London", "2004-01-15T00:00:00Z", "Z",
0937:                            "+0000", "+0:00" },
0938:                    { "de", "Europe/London", "2004-01-15T00:00:00Z", "ZZZZ",
0939:                            "GMT+00:00", "+0:00" },
0940:                    { "de", "Europe/London", "2004-01-15T00:00:00Z", "z",
0941:                            "GMT+00:00", "+0:00" },
0942:                    { "de", "Europe/London", "2004-01-15T00:00:00Z", "zzzz",
0943:                            "GMT+00:00", "+0:00" },
0944:                    { "de", "Europe/London", "2004-07-15T00:00:00Z", "Z",
0945:                            "+0100", "+1:00" },
0946:                    { "de", "Europe/London", "2004-07-15T00:00:00Z", "ZZZZ",
0947:                            "GMT+01:00", "+1:00" },
0948:                    { "de", "Europe/London", "2004-07-15T00:00:00Z", "z",
0949:                            "GMT+01:00", "+1:00" },
0950:                    { "de", "Europe/London", "2004-07-15T00:00:00Z", "zzzz",
0951:                            "GMT+01:00", "+1:00" },
0952:                    { "de", "Europe/London", "2004-07-15T00:00:00Z", "v",
0953:                            "Vereinigtes K\u00f6nigreich", "Europe/London" },
0954:                    { "de", "Europe/London", "2004-07-15T00:00:00Z", "vvvv",
0955:                            "Vereinigtes K\u00f6nigreich", "Europe/London" },
0956:
0957:                    { "de", "Etc/GMT+3", "2004-01-15T00:00:00Z", "Z", "-0300",
0958:                            "-3:00" },
0959:                    { "de", "Etc/GMT+3", "2004-01-15T00:00:00Z", "ZZZZ",
0960:                            "GMT-03:00", "-3:00" },
0961:                    { "de", "Etc/GMT+3", "2004-01-15T00:00:00Z", "z",
0962:                            "GMT-03:00", "-3:00" },
0963:                    { "de", "Etc/GMT+3", "2004-01-15T00:00:00Z", "zzzz",
0964:                            "GMT-03:00", "-3:00" },
0965:                    { "de", "Etc/GMT+3", "2004-07-15T00:00:00Z", "Z", "-0300",
0966:                            "-3:00" },
0967:                    { "de", "Etc/GMT+3", "2004-07-15T00:00:00Z", "ZZZZ",
0968:                            "GMT-03:00", "-3:00" },
0969:                    { "de", "Etc/GMT+3", "2004-07-15T00:00:00Z", "z",
0970:                            "GMT-03:00", "-3:00" },
0971:                    { "de", "Etc/GMT+3", "2004-07-15T00:00:00Z", "zzzz",
0972:                            "GMT-03:00", "-3:00" },
0973:                    { "de", "Etc/GMT+3", "2004-07-15T00:00:00Z", "v",
0974:                            "GMT-03:00", "-3:00" },
0975:                    { "de", "Etc/GMT+3", "2004-07-15T00:00:00Z", "vvvv",
0976:                            "GMT-03:00", "-3:00" },
0977:
0978:                    // JB#5150
0979:                    { "de", "Asia/Calcutta", "2004-01-15T00:00:00Z", "Z",
0980:                            "+0530", "+5:30" },
0981:                    { "de", "Asia/Calcutta", "2004-01-15T00:00:00Z", "ZZZZ",
0982:                            "GMT+05:30", "+5:30" },
0983:                    { "de", "Asia/Calcutta", "2004-01-15T00:00:00Z", "z",
0984:                            "GMT+05:30", "+5:30" },
0985:                    { "de", "Asia/Calcutta", "2004-01-15T00:00:00Z", "zzzz",
0986:                            "GMT+05:30", "+5:30" },
0987:                    { "de", "Asia/Calcutta", "2004-07-15T00:00:00Z", "Z",
0988:                            "+0530", "+5:30" },
0989:                    { "de", "Asia/Calcutta", "2004-07-15T00:00:00Z", "ZZZZ",
0990:                            "GMT+05:30", "+5:30" },
0991:                    { "de", "Asia/Calcutta", "2004-07-15T00:00:00Z", "z",
0992:                            "GMT+05:30", "+05:30" },
0993:                    { "de", "Asia/Calcutta", "2004-07-15T00:00:00Z", "zzzz",
0994:                            "GMT+05:30", "+5:30" },
0995:                    { "de", "Asia/Calcutta", "2004-07-15T00:00:00Z", "v",
0996:                            "Indien", "Asia/Calcutta" },
0997:                    { "de", "Asia/Calcutta", "2004-07-15T00:00:00Z", "vvvv",
0998:                            "Indien", "Asia/Calcutta" },
0999:
1000:                    // ==========
1001:
1002:                    { "zh", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z",
1003:                            "-0800", "-8:00" },
1004:                    { "zh", "America/Los_Angeles", "2004-01-15T00:00:00Z",
1005:                            "ZZZZ", "GMT-0800", "-8:00" },
1006:                    { "zh", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z",
1007:                            "PST", "America/Los_Angeles" },
1008:                    { "zh", "America/Los_Angeles", "2004-01-15T00:00:00Z",
1009:                            "zzzz",
1010:                            "\u592a\u5e73\u6d0b\u6807\u51c6\u65f6\u95f4",
1011:                            "America/Los_Angeles" },
1012:                    { "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z",
1013:                            "-0700", "-7:00" },
1014:                    { "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z",
1015:                            "ZZZZ", "GMT-0700", "-7:00" },
1016:                    { "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z",
1017:                            "PDT", "America/Los_Angeles" },
1018:                    { "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z",
1019:                            "zzzz",
1020:                            "\u592a\u5e73\u6d0b\u590f\u4ee4\u65f6\u95f4",
1021:                            "America/Los_Angeles" },
1022:                    // icu zh.txt has exemplar city for this time zone
1023:                    { "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v",
1024:                            "\u6d1b\u6749\u77f6 (\u7f8e\u56fd)",
1025:                            "America/Los_Angeles" },
1026:                    { "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z",
1027:                            "vvvv", "\u6d1b\u6749\u77f6 (\u7f8e\u56fd)",
1028:                            "America/Los_Angeles" },
1029:
1030:                    { "zh", "America/Argentina/Buenos_Aires",
1031:                            "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
1032:                    { "zh", "America/Argentina/Buenos_Aires",
1033:                            "2004-01-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
1034:                    { "zh", "America/Argentina/Buenos_Aires",
1035:                            "2004-01-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
1036:                    { "zh", "America/Argentina/Buenos_Aires",
1037:                            "2004-01-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
1038:                    { "zh", "America/Argentina/Buenos_Aires",
1039:                            "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
1040:                    { "zh", "America/Argentina/Buenos_Aires",
1041:                            "2004-07-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
1042:                    { "zh", "America/Argentina/Buenos_Aires",
1043:                            "2004-07-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
1044:                    { "zh", "America/Argentina/Buenos_Aires",
1045:                            "2004-07-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
1046:                    // icu zh.txt does not have info for this time zone
1047:                    {
1048:                            "zh",
1049:                            "America/Argentina/Buenos_Aires",
1050:                            "2004-07-15T00:00:00Z",
1051:                            "v",
1052:                            "\u5E03\u5B9C\u8BFA\u65AF\u827E\u5229\u65AF (\u963f\u6839\u5ef7)",
1053:                            "America/Buenos_Aires" },
1054:                    {
1055:                            "zh",
1056:                            "America/Argentina/Buenos_Aires",
1057:                            "2004-07-15T00:00:00Z",
1058:                            "vvvv",
1059:                            "\u5E03\u5B9C\u8BFA\u65AF\u827E\u5229\u65AF (\u963f\u6839\u5ef7)",
1060:                            "America/Buenos_Aires" },
1061:
1062:                    { "zh", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
1063:                            "Z", "-0300", "-3:00" },
1064:                    { "zh", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
1065:                            "ZZZZ", "GMT-0300", "-3:00" },
1066:                    { "zh", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
1067:                            "z", "GMT-0300", "-3:00" },
1068:                    { "zh", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
1069:                            "zzzz", "GMT-0300", "-3:00" },
1070:                    { "zh", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
1071:                            "Z", "-0300", "-3:00" },
1072:                    { "zh", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
1073:                            "ZZZZ", "GMT-0300", "-3:00" },
1074:                    { "zh", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
1075:                            "z", "GMT-0300", "-3:00" },
1076:                    { "zh", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
1077:                            "zzzz", "GMT-0300", "-3:00" },
1078:                    // icu zh.txt does not have info for this time zone
1079:                    {
1080:                            "zh",
1081:                            "America/Buenos_Aires",
1082:                            "2004-07-15T00:00:00Z",
1083:                            "v",
1084:                            "\u5E03\u5B9C\u8BFA\u65AF\u827E\u5229\u65AF (\u963f\u6839\u5ef7)",
1085:                            "America/Buenos_Aires" },
1086:                    {
1087:                            "zh",
1088:                            "America/Buenos_Aires",
1089:                            "2004-07-15T00:00:00Z",
1090:                            "vvvv",
1091:                            "\u5E03\u5B9C\u8BFA\u65AF\u827E\u5229\u65AF (\u963f\u6839\u5ef7)",
1092:                            "America/Buenos_Aires" },
1093:
1094:                    { "zh", "America/Havana", "2004-01-15T00:00:00Z", "Z",
1095:                            "-0500", "-5:00" },
1096:                    { "zh", "America/Havana", "2004-01-15T00:00:00Z", "ZZZZ",
1097:                            "GMT-0500", "-5:00" },
1098:                    { "zh", "America/Havana", "2004-01-15T00:00:00Z", "z",
1099:                            "GMT-0500", "-5:00" },
1100:                    { "zh", "America/Havana", "2004-01-15T00:00:00Z", "zzzz",
1101:                            "GMT-0500", "-5:00" },
1102:                    { "zh", "America/Havana", "2004-07-15T00:00:00Z", "Z",
1103:                            "-0400", "-4:00" },
1104:                    { "zh", "America/Havana", "2004-07-15T00:00:00Z", "ZZZZ",
1105:                            "GMT-0400", "-4:00" },
1106:                    { "zh", "America/Havana", "2004-07-15T00:00:00Z", "z",
1107:                            "GMT-0400", "-4:00" },
1108:                    { "zh", "America/Havana", "2004-07-15T00:00:00Z", "zzzz",
1109:                            "GMT-0400", "-4:00" },
1110:                    { "zh", "America/Havana", "2004-07-15T00:00:00Z", "v",
1111:                            "\u53e4\u5df4", "America/Havana" },
1112:                    { "zh", "America/Havana", "2004-07-15T00:00:00Z", "vvvv",
1113:                            "\u53e4\u5df4", "America/Havana" },
1114:
1115:                    { "zh", "Australia/ACT", "2004-01-15T00:00:00Z", "Z",
1116:                            "+1100", "+11:00" },
1117:                    { "zh", "Australia/ACT", "2004-01-15T00:00:00Z", "ZZZZ",
1118:                            "GMT+1100", "+11:00" },
1119:                    { "zh", "Australia/ACT", "2004-01-15T00:00:00Z", "z",
1120:                            "GMT+1100", "+11:00" },
1121:                    { "zh", "Australia/ACT", "2004-01-15T00:00:00Z", "zzzz",
1122:                            "GMT+1100", "+11:00" },
1123:                    { "zh", "Australia/ACT", "2004-07-15T00:00:00Z", "Z",
1124:                            "+1000", "+10:00" },
1125:                    { "zh", "Australia/ACT", "2004-07-15T00:00:00Z", "ZZZZ",
1126:                            "GMT+1000", "+10:00" },
1127:                    { "zh", "Australia/ACT", "2004-07-15T00:00:00Z", "z",
1128:                            "GMT+1000", "+10:00" },
1129:                    { "zh", "Australia/ACT", "2004-07-15T00:00:00Z", "zzzz",
1130:                            "GMT+1000", "+10:00" },
1131:                    // icu zh.txt does not have info for this time zone
1132:                    { "zh", "Australia/ACT", "2004-07-15T00:00:00Z", "v",
1133:                            "\u6089\u5C3C (\u6fb3\u5927\u5229\u4e9a)",
1134:                            "Australia/Sydney" },
1135:                    { "zh", "Australia/ACT", "2004-07-15T00:00:00Z", "vvvv",
1136:                            "\u6089\u5C3C (\u6fb3\u5927\u5229\u4e9a)",
1137:                            "Australia/Sydney" },
1138:
1139:                    { "zh", "Australia/Sydney", "2004-01-15T00:00:00Z", "Z",
1140:                            "+1100", "+11:00" },
1141:                    { "zh", "Australia/Sydney", "2004-01-15T00:00:00Z", "ZZZZ",
1142:                            "GMT+1100", "+11:00" },
1143:                    { "zh", "Australia/Sydney", "2004-01-15T00:00:00Z", "z",
1144:                            "GMT+1100", "+11:00" },
1145:                    { "zh", "Australia/Sydney", "2004-01-15T00:00:00Z", "zzzz",
1146:                            "GMT+1100", "+11:00" },
1147:                    { "zh", "Australia/Sydney", "2004-07-15T00:00:00Z", "Z",
1148:                            "+1000", "+10:00" },
1149:                    { "zh", "Australia/Sydney", "2004-07-15T00:00:00Z", "ZZZZ",
1150:                            "GMT+1000", "+10:00" },
1151:                    { "zh", "Australia/Sydney", "2004-07-15T00:00:00Z", "z",
1152:                            "GMT+1000", "+10:00" },
1153:                    { "zh", "Australia/Sydney", "2004-07-15T00:00:00Z", "zzzz",
1154:                            "GMT+1000", "+10:00" },
1155:                    { "zh", "Australia/Sydney", "2004-07-15T00:00:00Z", "v",
1156:                            "\u6089\u5C3C (\u6fb3\u5927\u5229\u4e9a)",
1157:                            "Australia/Sydney" },
1158:                    { "zh", "Australia/Sydney", "2004-07-15T00:00:00Z", "vvvv",
1159:                            "\u6089\u5C3C (\u6fb3\u5927\u5229\u4e9a)",
1160:                            "Australia/Sydney" },
1161:
1162:                    { "zh", "Europe/London", "2004-01-15T00:00:00Z", "Z",
1163:                            "+0000", "+0:00" },
1164:                    { "zh", "Europe/London", "2004-01-15T00:00:00Z", "ZZZZ",
1165:                            "GMT+0000", "+0:00" },
1166:                    { "zh", "Europe/London", "2004-01-15T00:00:00Z", "z",
1167:                            "GMT+0000", "+0:00" },
1168:                    { "zh", "Europe/London", "2004-01-15T00:00:00Z", "zzzz",
1169:                            "GMT+0000", "+0:00" },
1170:                    { "zh", "Europe/London", "2004-07-15T00:00:00Z", "Z",
1171:                            "+0100", "+1:00" },
1172:                    { "zh", "Europe/London", "2004-07-15T00:00:00Z", "ZZZZ",
1173:                            "GMT+0100", "+1:00" },
1174:                    { "zh", "Europe/London", "2004-07-15T00:00:00Z", "z",
1175:                            "GMT+0100", "+1:00" },
1176:                    { "zh", "Europe/London", "2004-07-15T00:00:00Z", "zzzz",
1177:                            "GMT+0100", "+1:00" },
1178:                    { "zh", "Europe/London", "2004-07-15T00:00:00Z", "v",
1179:                            "\u82f1\u56fd", "Europe/London" },
1180:                    { "zh", "Europe/London", "2004-07-15T00:00:00Z", "vvvv",
1181:                            "\u82f1\u56fd", "Europe/London" },
1182:
1183:                    { "zh", "Etc/GMT+3", "2004-01-15T00:00:00Z", "Z", "-0300",
1184:                            "-3:00" },
1185:                    { "zh", "Etc/GMT+3", "2004-01-15T00:00:00Z", "ZZZZ",
1186:                            "GMT-0300", "-3:00" },
1187:                    { "zh", "Etc/GMT+3", "2004-01-15T00:00:00Z", "z",
1188:                            "GMT-0300", "-3:00" },
1189:                    { "zh", "Etc/GMT+3", "2004-01-15T00:00:00Z", "zzzz",
1190:                            "GMT-0300", "-3:00" },
1191:                    { "zh", "Etc/GMT+3", "2004-07-15T00:00:00Z", "Z", "-0300",
1192:                            "-3:00" },
1193:                    { "zh", "Etc/GMT+3", "2004-07-15T00:00:00Z", "ZZZZ",
1194:                            "GMT-0300", "-3:00" },
1195:                    { "zh", "Etc/GMT+3", "2004-07-15T00:00:00Z", "z",
1196:                            "GMT-0300", "-3:00" },
1197:                    { "zh", "Etc/GMT+3", "2004-07-15T00:00:00Z", "zzzz",
1198:                            "GMT-0300", "-3:00" },
1199:                    { "zh", "Etc/GMT+3", "2004-07-15T00:00:00Z", "v",
1200:                            "GMT-0300", "-3:00" },
1201:                    { "zh", "Etc/GMT+3", "2004-07-15T00:00:00Z", "vvvv",
1202:                            "GMT-0300", "-3:00" },
1203:
1204:                    // JB#5150
1205:                    { "zh", "Asia/Calcutta", "2004-01-15T00:00:00Z", "Z",
1206:                            "+0530", "+5:30" },
1207:                    { "zh", "Asia/Calcutta", "2004-01-15T00:00:00Z", "ZZZZ",
1208:                            "GMT+0530", "+5:30" },
1209:                    { "zh", "Asia/Calcutta", "2004-01-15T00:00:00Z", "z",
1210:                            "GMT+0530", "+5:30" },
1211:                    { "zh", "Asia/Calcutta", "2004-01-15T00:00:00Z", "zzzz",
1212:                            "GMT+0530", "+5:30" },
1213:                    { "zh", "Asia/Calcutta", "2004-07-15T00:00:00Z", "Z",
1214:                            "+0530", "+5:30" },
1215:                    { "zh", "Asia/Calcutta", "2004-07-15T00:00:00Z", "ZZZZ",
1216:                            "GMT+0530", "+5:30" },
1217:                    { "zh", "Asia/Calcutta", "2004-07-15T00:00:00Z", "z",
1218:                            "GMT+0530", "+05:30" },
1219:                    { "zh", "Asia/Calcutta", "2004-07-15T00:00:00Z", "zzzz",
1220:                            "GMT+0530", "+5:30" },
1221:                    { "zh", "Asia/Calcutta", "2004-07-15T00:00:00Z", "v",
1222:                            "\u5370\u5EA6", "Asia/Calcutta" },
1223:                    { "zh", "Asia/Calcutta", "2004-07-15T00:00:00Z", "vvvv",
1224:                            "\u5370\u5EA6", "Asia/Calcutta" },
1225:
1226:                    // ==========
1227:
1228:                    { "hi", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z",
1229:                            "-0800", "-8:00" },
1230:                    { "hi", "America/Los_Angeles", "2004-01-15T00:00:00Z",
1231:                            "ZZZZ", "GMT-\u0966\u096e:\u0966\u0966", "-8:00" },
1232:                    { "hi", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z",
1233:                            "GMT-\u0966\u096e:\u0966\u0966", "-8:00" },
1234:                    { "hi", "America/Los_Angeles", "2004-01-15T00:00:00Z",
1235:                            "zzzz", "GMT-\u0966\u096e:\u0966\u0966", "-8:00" },
1236:                    { "hi", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z",
1237:                            "-0700", "-7:00" },
1238:                    { "hi", "America/Los_Angeles", "2004-07-15T00:00:00Z",
1239:                            "ZZZZ", "GMT-\u0966\u096d:\u0966\u0966", "-7:00" },
1240:                    { "hi", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z",
1241:                            "GMT-\u0966\u096d:\u0966\u0966", "-7:00" },
1242:                    { "hi", "America/Los_Angeles", "2004-07-15T00:00:00Z",
1243:                            "zzzz", "GMT-\u0966\u096d:\u0966\u0966", "-7:00" },
1244:                    {
1245:                            "hi",
1246:                            "America/Los_Angeles",
1247:                            "2004-07-15T00:00:00Z",
1248:                            "v",
1249:                            "Los Angeles (\u0938\u0902\u092f\u0941\u0915\u094d\u0924 \u0930\u093e\u091c\u094d\u092f \u0905\u092e\u0930\u093f\u0915\u093e)",
1250:                            "America/Los_Angeles" },
1251:                    {
1252:                            "hi",
1253:                            "America/Los_Angeles",
1254:                            "2004-07-15T00:00:00Z",
1255:                            "vvvv",
1256:                            "Los Angeles (\u0938\u0902\u092f\u0941\u0915\u094d\u0924 \u0930\u093e\u091c\u094d\u092f \u0905\u092e\u0930\u093f\u0915\u093e)",
1257:                            "America/Los_Angeles" },
1258:
1259:                    { "hi", "America/Argentina/Buenos_Aires",
1260:                            "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
1261:                    { "hi", "America/Argentina/Buenos_Aires",
1262:                            "2004-01-15T00:00:00Z", "ZZZZ",
1263:                            "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1264:                    { "hi", "America/Argentina/Buenos_Aires",
1265:                            "2004-01-15T00:00:00Z", "z",
1266:                            "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1267:                    { "hi", "America/Argentina/Buenos_Aires",
1268:                            "2004-01-15T00:00:00Z", "zzzz",
1269:                            "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1270:                    { "hi", "America/Argentina/Buenos_Aires",
1271:                            "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
1272:                    { "hi", "America/Argentina/Buenos_Aires",
1273:                            "2004-07-15T00:00:00Z", "ZZZZ",
1274:                            "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1275:                    { "hi", "America/Argentina/Buenos_Aires",
1276:                            "2004-07-15T00:00:00Z", "z",
1277:                            "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1278:                    { "hi", "America/Argentina/Buenos_Aires",
1279:                            "2004-07-15T00:00:00Z", "zzzz",
1280:                            "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1281:                    {
1282:                            "hi",
1283:                            "America/Argentina/Buenos_Aires",
1284:                            "2004-07-15T00:00:00Z",
1285:                            "v",
1286:                            "Buenos Aires (\u0905\u0930\u094d\u091c\u0947\u0928\u094d\u091f\u0940\u0928\u093e)",
1287:                            "America/Buenos_Aires" },
1288:                    {
1289:                            "hi",
1290:                            "America/Argentina/Buenos_Aires",
1291:                            "2004-07-15T00:00:00Z",
1292:                            "vvvv",
1293:                            "Buenos Aires (\u0905\u0930\u094d\u091c\u0947\u0928\u094d\u091f\u0940\u0928\u093e)",
1294:                            "America/Buenos_Aires" },
1295:
1296:                    { "hi", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
1297:                            "Z", "-0300", "-3:00" },
1298:                    { "hi", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
1299:                            "ZZZZ", "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1300:                    { "hi", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
1301:                            "z", "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1302:                    { "hi", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
1303:                            "zzzz", "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1304:                    { "hi", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
1305:                            "Z", "-0300", "-3:00" },
1306:                    { "hi", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
1307:                            "ZZZZ", "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1308:                    { "hi", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
1309:                            "z", "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1310:                    { "hi", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
1311:                            "zzzz", "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1312:                    {
1313:                            "hi",
1314:                            "America/Buenos_Aires",
1315:                            "2004-07-15T00:00:00Z",
1316:                            "v",
1317:                            "Buenos Aires (\u0905\u0930\u094d\u091c\u0947\u0928\u094d\u091f\u0940\u0928\u093e)",
1318:                            "America/Buenos_Aires" },
1319:                    {
1320:                            "hi",
1321:                            "America/Buenos_Aires",
1322:                            "2004-07-15T00:00:00Z",
1323:                            "vvvv",
1324:                            "Buenos Aires (\u0905\u0930\u094d\u091c\u0947\u0928\u094d\u091f\u0940\u0928\u093e)",
1325:                            "America/Buenos_Aires" },
1326:
1327:                    { "hi", "America/Havana", "2004-01-15T00:00:00Z", "Z",
1328:                            "-0500", "-5:00" },
1329:                    { "hi", "America/Havana", "2004-01-15T00:00:00Z", "ZZZZ",
1330:                            "GMT-\u0966\u096b:\u0966\u0966", "-5:00" },
1331:                    { "hi", "America/Havana", "2004-01-15T00:00:00Z", "z",
1332:                            "GMT-\u0966\u096b:\u0966\u0966", "-5:00" },
1333:                    { "hi", "America/Havana", "2004-01-15T00:00:00Z", "zzzz",
1334:                            "GMT-\u0966\u096b:\u0966\u0966", "-5:00" },
1335:                    { "hi", "America/Havana", "2004-07-15T00:00:00Z", "Z",
1336:                            "-0400", "-4:00" },
1337:                    { "hi", "America/Havana", "2004-07-15T00:00:00Z", "ZZZZ",
1338:                            "GMT-\u0966\u096a:\u0966\u0966", "-4:00" },
1339:                    { "hi", "America/Havana", "2004-07-15T00:00:00Z", "z",
1340:                            "GMT-\u0966\u096a:\u0966\u0966", "-4:00" },
1341:                    { "hi", "America/Havana", "2004-07-15T00:00:00Z", "zzzz",
1342:                            "GMT-\u0966\u096a:\u0966\u0966", "-4:00" },
1343:                    { "hi", "America/Havana", "2004-07-15T00:00:00Z", "v",
1344:                            "\u0915\u094d\u092f\u0942\u092c\u093e",
1345:                            "America/Havana" },
1346:                    { "hi", "America/Havana", "2004-07-15T00:00:00Z", "vvvv",
1347:                            "\u0915\u094d\u092f\u0942\u092c\u093e",
1348:                            "America/Havana" },
1349:
1350:                    { "hi", "Australia/ACT", "2004-01-15T00:00:00Z", "Z",
1351:                            "+1100", "+11:00" },
1352:                    { "hi", "Australia/ACT", "2004-01-15T00:00:00Z", "ZZZZ",
1353:                            "GMT+\u0967\u0967:\u0966\u0966", "+11:00" },
1354:                    { "hi", "Australia/ACT", "2004-01-15T00:00:00Z", "z",
1355:                            "GMT+\u0967\u0967:\u0966\u0966", "+11:00" },
1356:                    { "hi", "Australia/ACT", "2004-01-15T00:00:00Z", "zzzz",
1357:                            "GMT+\u0967\u0967:\u0966\u0966", "+11:00" },
1358:                    { "hi", "Australia/ACT", "2004-07-15T00:00:00Z", "Z",
1359:                            "+1000", "+10:00" },
1360:                    { "hi", "Australia/ACT", "2004-07-15T00:00:00Z", "ZZZZ",
1361:                            "GMT+\u0967\u0966:\u0966\u0966", "+10:00" },
1362:                    { "hi", "Australia/ACT", "2004-07-15T00:00:00Z", "z",
1363:                            "GMT+\u0967\u0966:\u0966\u0966", "+10:00" },
1364:                    { "hi", "Australia/ACT", "2004-07-15T00:00:00Z", "zzzz",
1365:                            "GMT+\u0967\u0966:\u0966\u0966", "+10:00" },
1366:                    {
1367:                            "hi",
1368:                            "Australia/ACT",
1369:                            "2004-07-15T00:00:00Z",
1370:                            "v",
1371:                            "Sydney (\u0911\u0938\u094d\u091f\u094d\u0930\u0947\u0932\u093f\u092f\u093e)",
1372:                            "Australia/Sydney" },
1373:                    {
1374:                            "hi",
1375:                            "Australia/ACT",
1376:                            "2004-07-15T00:00:00Z",
1377:                            "vvvv",
1378:                            "Sydney (\u0911\u0938\u094d\u091f\u094d\u0930\u0947\u0932\u093f\u092f\u093e)",
1379:                            "Australia/Sydney" },
1380:
1381:                    { "hi", "Australia/Sydney", "2004-01-15T00:00:00Z", "Z",
1382:                            "+1100", "+11:00" },
1383:                    { "hi", "Australia/Sydney", "2004-01-15T00:00:00Z", "ZZZZ",
1384:                            "GMT+\u0967\u0967:\u0966\u0966", "+11:00" },
1385:                    { "hi", "Australia/Sydney", "2004-01-15T00:00:00Z", "z",
1386:                            "GMT+\u0967\u0967:\u0966\u0966", "+11:00" },
1387:                    { "hi", "Australia/Sydney", "2004-01-15T00:00:00Z", "zzzz",
1388:                            "GMT+\u0967\u0967:\u0966\u0966", "+11:00" },
1389:                    { "hi", "Australia/Sydney", "2004-07-15T00:00:00Z", "Z",
1390:                            "+1000", "+10:00" },
1391:                    { "hi", "Australia/Sydney", "2004-07-15T00:00:00Z", "ZZZZ",
1392:                            "GMT+\u0967\u0966:\u0966\u0966", "+10:00" },
1393:                    { "hi", "Australia/Sydney", "2004-07-15T00:00:00Z", "z",
1394:                            "GMT+\u0967\u0966:\u0966\u0966", "+10:00" },
1395:                    { "hi", "Australia/Sydney", "2004-07-15T00:00:00Z", "zzzz",
1396:                            "GMT+\u0967\u0966:\u0966\u0966", "+10:00" },
1397:                    {
1398:                            "hi",
1399:                            "Australia/Sydney",
1400:                            "2004-07-15T00:00:00Z",
1401:                            "v",
1402:                            "Sydney (\u0911\u0938\u094d\u091f\u094d\u0930\u0947\u0932\u093f\u092f\u093e)",
1403:                            "Australia/Sydney" },
1404:                    {
1405:                            "hi",
1406:                            "Australia/Sydney",
1407:                            "2004-07-15T00:00:00Z",
1408:                            "vvvv",
1409:                            "Sydney (\u0911\u0938\u094d\u091f\u094d\u0930\u0947\u0932\u093f\u092f\u093e)",
1410:                            "Australia/Sydney" },
1411:
1412:                    { "hi", "Europe/London", "2004-01-15T00:00:00Z", "Z",
1413:                            "+0000", "+0:00" },
1414:                    { "hi", "Europe/London", "2004-01-15T00:00:00Z", "ZZZZ",
1415:                            "GMT+\u0966\u0966:\u0966\u0966", "+0:00" },
1416:                    { "hi", "Europe/London", "2004-01-15T00:00:00Z", "z",
1417:                            "GMT+\u0966\u0966:\u0966\u0966", "+0:00" },
1418:                    { "hi", "Europe/London", "2004-01-15T00:00:00Z", "zzzz",
1419:                            "GMT+\u0966\u0966:\u0966\u0966", "+0:00" },
1420:                    { "hi", "Europe/London", "2004-07-15T00:00:00Z", "Z",
1421:                            "+0100", "+1:00" },
1422:                    { "hi", "Europe/London", "2004-07-15T00:00:00Z", "ZZZZ",
1423:                            "GMT+\u0966\u0967:\u0966\u0966", "+1:00" },
1424:                    { "hi", "Europe/London", "2004-07-15T00:00:00Z", "z",
1425:                            "GMT+\u0966\u0967:\u0966\u0966", "+1:00" },
1426:                    { "hi", "Europe/London", "2004-07-15T00:00:00Z", "zzzz",
1427:                            "GMT+\u0966\u0967:\u0966\u0966", "+1:00" },
1428:                    { "hi", "Europe/London", "2004-07-15T00:00:00Z", "v",
1429:                            "\u092C\u094D\u0930\u093F\u0924\u0928",
1430:                            "Europe/London" },
1431:                    { "hi", "Europe/London", "2004-07-15T00:00:00Z", "vvvv",
1432:                            "\u092C\u094D\u0930\u093F\u0924\u0928",
1433:                            "Europe/London" },
1434:
1435:                    { "hi", "Etc/GMT+3", "2004-01-15T00:00:00Z", "Z", "-0300",
1436:                            "-3:00" },
1437:                    { "hi", "Etc/GMT+3", "2004-01-15T00:00:00Z", "ZZZZ",
1438:                            "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1439:                    { "hi", "Etc/GMT+3", "2004-01-15T00:00:00Z", "z",
1440:                            "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1441:                    { "hi", "Etc/GMT+3", "2004-01-15T00:00:00Z", "zzzz",
1442:                            "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1443:                    { "hi", "Etc/GMT+3", "2004-07-15T00:00:00Z", "Z", "-0300",
1444:                            "-3:00" },
1445:                    { "hi", "Etc/GMT+3", "2004-07-15T00:00:00Z", "ZZZZ",
1446:                            "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1447:                    { "hi", "Etc/GMT+3", "2004-07-15T00:00:00Z", "z",
1448:                            "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1449:                    { "hi", "Etc/GMT+3", "2004-07-15T00:00:00Z", "zzzz",
1450:                            "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1451:                    { "hi", "Etc/GMT+3", "2004-07-15T00:00:00Z", "v",
1452:                            "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1453:                    { "hi", "Etc/GMT+3", "2004-07-15T00:00:00Z", "vvvv",
1454:                            "GMT-\u0966\u0969:\u0966\u0966", "-3:00" },
1455:
1456:                    { "hi", "Asia/Calcutta", "2004-01-15T00:00:00Z", "Z",
1457:                            "+0530", "+5:30" },
1458:                    { "hi", "Asia/Calcutta", "2004-01-15T00:00:00Z", "ZZZZ",
1459:                            "GMT+\u0966\u096B:\u0969\u0966", "+5:30" },
1460:                    { "hi", "Asia/Calcutta", "2004-01-15T00:00:00Z", "z",
1461:                            "IST", "+5:30" },
1462:                    {
1463:                            "hi",
1464:                            "Asia/Calcutta",
1465:                            "2004-01-15T00:00:00Z",
1466:                            "zzzz",
1467:                            "\u092D\u093E\u0930\u0924\u0940\u092F \u0938\u092E\u092F",
1468:                            "+5:30" },
1469:                    { "hi", "Asia/Calcutta", "2004-07-15T00:00:00Z", "Z",
1470:                            "+0530", "+5:30" },
1471:                    { "hi", "Asia/Calcutta", "2004-07-15T00:00:00Z", "ZZZZ",
1472:                            "GMT+\u0966\u096B:\u0969\u0966", "+5:30" },
1473:                    { "hi", "Asia/Calcutta", "2004-07-15T00:00:00Z", "z",
1474:                            "IST", "+05:30" },
1475:                    {
1476:                            "hi",
1477:                            "Asia/Calcutta",
1478:                            "2004-07-15T00:00:00Z",
1479:                            "zzzz",
1480:                            "\u092D\u093E\u0930\u0924\u0940\u092F \u0938\u092E\u092F",
1481:                            "+5:30" },
1482:                    { "hi", "Asia/Calcutta", "2004-07-15T00:00:00Z", "v",
1483:                            "\u092D\u093E\u0930\u0924", "Asia/Calcutta" },
1484:                    { "hi", "Asia/Calcutta", "2004-07-15T00:00:00Z", "vvvv",
1485:                            "\u092D\u093E\u0930\u0924", "Asia/Calcutta" },
1486:
1487:                    // ==========
1488:
1489:                    { "bg", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z",
1490:                            "-0800", "-8:00" },
1491:                    {
1492:                            "bg",
1493:                            "America/Los_Angeles",
1494:                            "2004-01-15T00:00:00Z",
1495:                            "ZZZZ",
1496:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447-0800",
1497:                            "-8:00" },
1498:                    { "bg", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z",
1499:                            "PST", "America/Los_Angeles" },
1500:                    {
1501:                            "bg",
1502:                            "America/Los_Angeles",
1503:                            "2004-01-15T00:00:00Z",
1504:                            "zzzz",
1505:                            "\u0422\u0438\u0445\u043E\u043E\u043A\u0435\u0430\u043D\u0441\u043A\u0430 \u0447\u0430\u0441\u043E\u0432\u0430 \u0437\u043E\u043D\u0430",
1506:                            "America/Los_Angeles" },
1507:                    { "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z",
1508:                            "-0700", "-7:00" },
1509:                    {
1510:                            "bg",
1511:                            "America/Los_Angeles",
1512:                            "2004-07-15T00:00:00Z",
1513:                            "ZZZZ",
1514:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447-0700",
1515:                            "-7:00" },
1516:                    { "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z",
1517:                            "PDT", "America/Los_Angeles" },
1518:                    {
1519:                            "bg",
1520:                            "America/Los_Angeles",
1521:                            "2004-07-15T00:00:00Z",
1522:                            "zzzz",
1523:                            "\u0422\u0438\u0445\u043E\u043E\u043A\u0435\u0430\u043D\u0441\u043A\u0430 \u043B\u044F\u0442\u043D\u0430 \u0447\u0430\u0441\u043E\u0432\u0430 \u0437\u043E\u043D\u0430",
1524:                            "America/Los_Angeles" },
1525:                    // icu bg.txt has exemplar city for this time zone
1526:                    {
1527:                            "bg",
1528:                            "America/Los_Angeles",
1529:                            "2004-07-15T00:00:00Z",
1530:                            "v",
1531:                            "\u041b\u043e\u0441 \u0410\u043d\u0436\u0435\u043b\u0438\u0441 (\u0421\u0410\u0429)",
1532:                            "America/Los_Angeles" },
1533:                    {
1534:                            "bg",
1535:                            "America/Los_Angeles",
1536:                            "2004-07-15T00:00:00Z",
1537:                            "vvvv",
1538:                            "\u041b\u043e\u0441 \u0410\u043d\u0436\u0435\u043b\u0438\u0441 (\u0421\u0410\u0429)",
1539:                            "America/Los_Angeles" },
1540:
1541:                    { "bg", "America/Argentina/Buenos_Aires",
1542:                            "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
1543:                    {
1544:                            "bg",
1545:                            "America/Argentina/Buenos_Aires",
1546:                            "2004-01-15T00:00:00Z",
1547:                            "ZZZZ",
1548:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447-0300",
1549:                            "-3:00" },
1550:                    {
1551:                            "bg",
1552:                            "America/Argentina/Buenos_Aires",
1553:                            "2004-01-15T00:00:00Z",
1554:                            "z",
1555:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447-0300",
1556:                            "-3:00" },
1557:                    {
1558:                            "bg",
1559:                            "America/Argentina/Buenos_Aires",
1560:                            "2004-01-15T00:00:00Z",
1561:                            "zzzz",
1562:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447-0300",
1563:                            "-3:00" },
1564:                    { "bg", "America/Argentina/Buenos_Aires",
1565:                            "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
1566:                    {
1567:                            "bg",
1568:                            "America/Argentina/Buenos_Aires",
1569:                            "2004-07-15T00:00:00Z",
1570:                            "ZZZZ",
1571:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447-0300",
1572:                            "-3:00" },
1573:                    {
1574:                            "bg",
1575:                            "America/Argentina/Buenos_Aires",
1576:                            "2004-07-15T00:00:00Z",
1577:                            "z",
1578:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447-0300",
1579:                            "-3:00" },
1580:                    {
1581:                            "bg",
1582:                            "America/Argentina/Buenos_Aires",
1583:                            "2004-07-15T00:00:00Z",
1584:                            "zzzz",
1585:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447-0300",
1586:                            "-3:00" },
1587:                    {
1588:                            "bg",
1589:                            "America/Argentina/Buenos_Aires",
1590:                            "2004-07-15T00:00:00Z",
1591:                            "v",
1592:                            "\u0411\u0443\u0435\u043D\u043E\u0441 \u0410\u0439\u0440\u0435\u0441 (\u0410\u0440\u0436\u0435\u043d\u0442\u0438\u043d\u0430)",
1593:                            "America/Buenos_Aires" },
1594:                    {
1595:                            "bg",
1596:                            "America/Argentina/Buenos_Aires",
1597:                            "2004-07-15T00:00:00Z",
1598:                            "vvvv",
1599:                            "\u0411\u0443\u0435\u043D\u043E\u0441 \u0410\u0439\u0440\u0435\u0441 (\u0410\u0440\u0436\u0435\u043d\u0442\u0438\u043d\u0430)",
1600:                            "America/Buenos_Aires" },
1601:
1602:                    { "bg", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
1603:                            "Z", "-0300", "-3:00" },
1604:                    {
1605:                            "bg",
1606:                            "America/Buenos_Aires",
1607:                            "2004-01-15T00:00:00Z",
1608:                            "ZZZZ",
1609:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447-0300",
1610:                            "-3:00" },
1611:                    {
1612:                            "bg",
1613:                            "America/Buenos_Aires",
1614:                            "2004-01-15T00:00:00Z",
1615:                            "z",
1616:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447-0300",
1617:                            "-3:00" },
1618:                    {
1619:                            "bg",
1620:                            "America/Buenos_Aires",
1621:                            "2004-01-15T00:00:00Z",
1622:                            "zzzz",
1623:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447-0300",
1624:                            "-3:00" },
1625:                    { "bg", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
1626:                            "Z", "-0300", "-3:00" },
1627:                    {
1628:                            "bg",
1629:                            "America/Buenos_Aires",
1630:                            "2004-07-15T00:00:00Z",
1631:                            "ZZZZ",
1632:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447-0300",
1633:                            "-3:00" },
1634:                    {
1635:                            "bg",
1636:                            "America/Buenos_Aires",
1637:                            "2004-07-15T00:00:00Z",
1638:                            "z",
1639:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447-0300",
1640:                            "-3:00" },
1641:                    {
1642:                            "bg",
1643:                            "America/Buenos_Aires",
1644:                            "2004-07-15T00:00:00Z",
1645:                            "zzzz",
1646:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447-0300",
1647:                            "-3:00" },
1648:                    // icu bg.txt does not have info for this time zone
1649:                    {
1650:                            "bg",
1651:                            "America/Buenos_Aires",
1652:                            "2004-07-15T00:00:00Z",
1653:                            "v",
1654:                            "\u0411\u0443\u0435\u043D\u043E\u0441 \u0410\u0439\u0440\u0435\u0441 (\u0410\u0440\u0436\u0435\u043d\u0442\u0438\u043d\u0430)",
1655:                            "America/Buenos_Aires" },
1656:                    {
1657:                            "bg",
1658:                            "America/Buenos_Aires",
1659:                            "2004-07-15T00:00:00Z",
1660:                            "vvvv",
1661:                            "\u0411\u0443\u0435\u043D\u043E\u0441 \u0410\u0439\u0440\u0435\u0441 (\u0410\u0440\u0436\u0435\u043d\u0442\u0438\u043d\u0430)",
1662:                            "America/Buenos_Aires" },
1663:
1664:                    { "bg", "America/Havana", "2004-01-15T00:00:00Z", "Z",
1665:                            "-0500", "-5:00" },
1666:                    {
1667:                            "bg",
1668:                            "America/Havana",
1669:                            "2004-01-15T00:00:00Z",
1670:                            "ZZZZ",
1671:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447-0500",
1672:                            "-5:00" },
1673:                    {
1674:                            "bg",
1675:                            "America/Havana",
1676:                            "2004-01-15T00:00:00Z",
1677:                            "z",
1678:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447-0500",
1679:                            "-5:00" },
1680:                    {
1681:                            "bg",
1682:                            "America/Havana",
1683:                            "2004-01-15T00:00:00Z",
1684:                            "zzzz",
1685:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447-0500",
1686:                            "-5:00" },
1687:                    { "bg", "America/Havana", "2004-07-15T00:00:00Z", "Z",
1688:                            "-0400", "-4:00" },
1689:                    {
1690:                            "bg",
1691:                            "America/Havana",
1692:                            "2004-07-15T00:00:00Z",
1693:                            "ZZZZ",
1694:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447-0400",
1695:                            "-4:00" },
1696:                    {
1697:                            "bg",
1698:                            "America/Havana",
1699:                            "2004-07-15T00:00:00Z",
1700:                            "z",
1701:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447-0400",
1702:                            "-4:00" },
1703:                    {
1704:                            "bg",
1705:                            "America/Havana",
1706:                            "2004-07-15T00:00:00Z",
1707:                            "zzzz",
1708:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447-0400",
1709:                            "-4:00" },
1710:                    { "bg", "America/Havana", "2004-07-15T00:00:00Z", "v",
1711:                            "\u041a\u0443\u0431\u0430", "America/Havana" },
1712:                    { "bg", "America/Havana", "2004-07-15T00:00:00Z", "vvvv",
1713:                            "\u041a\u0443\u0431\u0430", "America/Havana" },
1714:
1715:                    { "bg", "Australia/ACT", "2004-01-15T00:00:00Z", "Z",
1716:                            "+1100", "+11:00" },
1717:                    {
1718:                            "bg",
1719:                            "Australia/ACT",
1720:                            "2004-01-15T00:00:00Z",
1721:                            "ZZZZ",
1722:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447+1100",
1723:                            "+11:00" },
1724:                    {
1725:                            "bg",
1726:                            "Australia/ACT",
1727:                            "2004-01-15T00:00:00Z",
1728:                            "z",
1729:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447+1100",
1730:                            "+11:00" },
1731:                    {
1732:                            "bg",
1733:                            "Australia/ACT",
1734:                            "2004-01-15T00:00:00Z",
1735:                            "zzzz",
1736:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447+1100",
1737:                            "+11:00" },
1738:                    { "bg", "Australia/ACT", "2004-07-15T00:00:00Z", "Z",
1739:                            "+1000", "+10:00" },
1740:                    {
1741:                            "bg",
1742:                            "Australia/ACT",
1743:                            "2004-07-15T00:00:00Z",
1744:                            "ZZZZ",
1745:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447+1000",
1746:                            "+10:00" },
1747:                    {
1748:                            "bg",
1749:                            "Australia/ACT",
1750:                            "2004-07-15T00:00:00Z",
1751:                            "z",
1752:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447+1000",
1753:                            "+10:00" },
1754:                    {
1755:                            "bg",
1756:                            "Australia/ACT",
1757:                            "2004-07-15T00:00:00Z",
1758:                            "zzzz",
1759:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447+1000",
1760:                            "+10:00" },
1761:                    {
1762:                            "bg",
1763:                            "Australia/ACT",
1764:                            "2004-07-15T00:00:00Z",
1765:                            "v",
1766:                            "\u0421\u0438\u0434\u043D\u0438 (\u0410\u0432\u0441\u0442\u0440\u0430\u043b\u0438\u044f)",
1767:                            "Australia/Sydney" },
1768:                    {
1769:                            "bg",
1770:                            "Australia/ACT",
1771:                            "2004-07-15T00:00:00Z",
1772:                            "vvvv",
1773:                            "\u0421\u0438\u0434\u043D\u0438 (\u0410\u0432\u0441\u0442\u0440\u0430\u043b\u0438\u044f)",
1774:                            "Australia/Sydney" },
1775:
1776:                    { "bg", "Australia/Sydney", "2004-01-15T00:00:00Z", "Z",
1777:                            "+1100", "+11:00" },
1778:                    {
1779:                            "bg",
1780:                            "Australia/Sydney",
1781:                            "2004-01-15T00:00:00Z",
1782:                            "ZZZZ",
1783:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447+1100",
1784:                            "+11:00" },
1785:                    {
1786:                            "bg",
1787:                            "Australia/Sydney",
1788:                            "2004-01-15T00:00:00Z",
1789:                            "z",
1790:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447+1100",
1791:                            "+11:00" },
1792:                    {
1793:                            "bg",
1794:                            "Australia/Sydney",
1795:                            "2004-01-15T00:00:00Z",
1796:                            "zzzz",
1797:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447+1100",
1798:                            "+11:00" },
1799:                    { "bg", "Australia/Sydney", "2004-07-15T00:00:00Z", "Z",
1800:                            "+1000", "+10:00" },
1801:                    {
1802:                            "bg",
1803:                            "Australia/Sydney",
1804:                            "2004-07-15T00:00:00Z",
1805:                            "ZZZZ",
1806:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447+1000",
1807:                            "+10:00" },
1808:                    {
1809:                            "bg",
1810:                            "Australia/Sydney",
1811:                            "2004-07-15T00:00:00Z",
1812:                            "z",
1813:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447+1000",
1814:                            "+10:00" },
1815:                    {
1816:                            "bg",
1817:                            "Australia/Sydney",
1818:                            "2004-07-15T00:00:00Z",
1819:                            "zzzz",
1820:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447+1000",
1821:                            "+10:00" },
1822:                    {
1823:                            "bg",
1824:                            "Australia/Sydney",
1825:                            "2004-07-15T00:00:00Z",
1826:                            "v",
1827:                            "\u0421\u0438\u0434\u043D\u0438 (\u0410\u0432\u0441\u0442\u0440\u0430\u043b\u0438\u044f)",
1828:                            "Australia/Sydney" },
1829:                    {
1830:                            "bg",
1831:                            "Australia/Sydney",
1832:                            "2004-07-15T00:00:00Z",
1833:                            "vvvv",
1834:                            "\u0421\u0438\u0434\u043D\u0438 (\u0410\u0432\u0441\u0442\u0440\u0430\u043b\u0438\u044f)",
1835:                            "Australia/Sydney" },
1836:
1837:                    { "bg", "Europe/London", "2004-01-15T00:00:00Z", "Z",
1838:                            "+0000", "+0:00" },
1839:                    {
1840:                            "bg",
1841:                            "Europe/London",
1842:                            "2004-01-15T00:00:00Z",
1843:                            "ZZZZ",
1844:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447+0000",
1845:                            "+0:00" },
1846:                    {
1847:                            "bg",
1848:                            "Europe/London",
1849:                            "2004-01-15T00:00:00Z",
1850:                            "z",
1851:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447+0000",
1852:                            "+0:00" },
1853:                    {
1854:                            "bg",
1855:                            "Europe/London",
1856:                            "2004-01-15T00:00:00Z",
1857:                            "zzzz",
1858:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447+0000",
1859:                            "+0:00" },
1860:                    { "bg", "Europe/London", "2004-07-15T00:00:00Z", "Z",
1861:                            "+0100", "+1:00" },
1862:                    {
1863:                            "bg",
1864:                            "Europe/London",
1865:                            "2004-07-15T00:00:00Z",
1866:                            "ZZZZ",
1867:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447+0100",
1868:                            "+1:00" },
1869:                    {
1870:                            "bg",
1871:                            "Europe/London",
1872:                            "2004-07-15T00:00:00Z",
1873:                            "z",
1874:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447+0100",
1875:                            "+1:00" },
1876:                    {
1877:                            "bg",
1878:                            "Europe/London",
1879:                            "2004-07-15T00:00:00Z",
1880:                            "zzzz",
1881:                            "\u0413\u0440\u0438\u0438\u043D\u0443\u0438\u0447+0100",
1882:                            "+1:00" },
1883:                    {
1884:                            "bg",
1885:                            "Europe/London",
1886:                            "2004-07-15T00:00:00Z",
1887:                            "v",
1888:                            "\u041e\u0431\u0435\u0434\u0438\u043d\u0435\u043d\u043e \u043a\u0440\u0430\u043b\u0441\u0442\u0432\u043e",
1889:                            "Europe/London" },
1890:                    {
1891:                            "bg",
1892:                            "Europe/London",
1893:                            "2004-07-15T00:00:00Z",
1894:                            "vvvv",
1895:                            "\u041e\u0431\u0435\u0434\u0438\u043d\u0435\u043d\u043e \u043a\u0440\u0430\u043b\u0441\u0442\u0432\u043e",
1896:                            "Europe/London" },
1897:
1898:                    { "bg", "Etc/GMT+3", "2004-01-15T00:00:00Z", "Z", "-0300",
1899:                            "-3:00" },
1900:                    {
1901:                            "bg",
1902:                            "Etc/GMT+3",
1903:                            "2004-01-15T00:00:00Z",
1904:                            "ZZZZ",
1905:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447-0300",
1906:                            "-3:00" },
1907:                    {
1908:                            "bg",
1909:                            "Etc/GMT+3",
1910:                            "2004-01-15T00:00:00Z",
1911:                            "z",
1912:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447-0300",
1913:                            "-3:00" },
1914:                    {
1915:                            "bg",
1916:                            "Etc/GMT+3",
1917:                            "2004-01-15T00:00:00Z",
1918:                            "zzzz",
1919:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447-0300",
1920:                            "-3:00" },
1921:                    { "bg", "Etc/GMT+3", "2004-07-15T00:00:00Z", "Z", "-0300",
1922:                            "-3:00" },
1923:                    {
1924:                            "bg",
1925:                            "Etc/GMT+3",
1926:                            "2004-07-15T00:00:00Z",
1927:                            "ZZZZ",
1928:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447-0300",
1929:                            "-3:00" },
1930:                    {
1931:                            "bg",
1932:                            "Etc/GMT+3",
1933:                            "2004-07-15T00:00:00Z",
1934:                            "z",
1935:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447-0300",
1936:                            "-3:00" },
1937:                    {
1938:                            "bg",
1939:                            "Etc/GMT+3",
1940:                            "2004-07-15T00:00:00Z",
1941:                            "zzzz",
1942:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447-0300",
1943:                            "-3:00" },
1944:                    {
1945:                            "bg",
1946:                            "Etc/GMT+3",
1947:                            "2004-07-15T00:00:00Z",
1948:                            "v",
1949:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447-0300",
1950:                            "-3:00" },
1951:                    {
1952:                            "bg",
1953:                            "Etc/GMT+3",
1954:                            "2004-07-15T00:00:00Z",
1955:                            "vvvv",
1956:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447-0300",
1957:                            "-3:00" },
1958:
1959:                    // JB#5150
1960:                    { "bg", "Asia/Calcutta", "2004-01-15T00:00:00Z", "Z",
1961:                            "+0530", "+5:30" },
1962:                    {
1963:                            "bg",
1964:                            "Asia/Calcutta",
1965:                            "2004-01-15T00:00:00Z",
1966:                            "ZZZZ",
1967:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447+0530",
1968:                            "+5:30" },
1969:                    {
1970:                            "bg",
1971:                            "Asia/Calcutta",
1972:                            "2004-01-15T00:00:00Z",
1973:                            "z",
1974:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447+0530",
1975:                            "+5:30" },
1976:                    {
1977:                            "bg",
1978:                            "Asia/Calcutta",
1979:                            "2004-01-15T00:00:00Z",
1980:                            "zzzz",
1981:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447+0530",
1982:                            "+5:30" },
1983:                    { "bg", "Asia/Calcutta", "2004-07-15T00:00:00Z", "Z",
1984:                            "+0530", "+5:30" },
1985:                    {
1986:                            "bg",
1987:                            "Asia/Calcutta",
1988:                            "2004-07-15T00:00:00Z",
1989:                            "ZZZZ",
1990:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447+0530",
1991:                            "+5:30" },
1992:                    {
1993:                            "bg",
1994:                            "Asia/Calcutta",
1995:                            "2004-07-15T00:00:00Z",
1996:                            "z",
1997:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447+0530",
1998:                            "+05:30" },
1999:                    {
2000:                            "bg",
2001:                            "Asia/Calcutta",
2002:                            "2004-07-15T00:00:00Z",
2003:                            "zzzz",
2004:                            "\u0413\u0440\u0438\u0438\u043d\u0443\u0438\u0447+0530",
2005:                            "+5:30" },
2006:                    { "bg", "Asia/Calcutta", "2004-07-15T00:00:00Z", "v",
2007:                            "\u0418\u043D\u0434\u0438\u044F", "Asia/Calcutta" },
2008:                    { "bg", "Asia/Calcutta", "2004-07-15T00:00:00Z", "vvvv",
2009:                            "\u0418\u043D\u0434\u0438\u044F", "Asia/Calcutta" },
2010:
2011:                    // ==========
2012:
2013:                    { "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z",
2014:                            "-0800", "-8:00" },
2015:                    { "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z",
2016:                            "ZZZZ", "GMT-0800", "-8:00" },
2017:                    { "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z",
2018:                            "PST", "America/Los_Angeles" },
2019:                    { "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z",
2020:                            "zzzz", "\u592a\u5e73\u6d0b\u6a19\u6e96\u6642",
2021:                            "America/Los_Angeles" },
2022:                    { "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z",
2023:                            "-0700", "-7:00" },
2024:                    { "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z",
2025:                            "ZZZZ", "GMT-0700", "-7:00" },
2026:                    { "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z",
2027:                            "PDT", "America/Los_Angeles" },
2028:                    { "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z",
2029:                            "zzzz", "\u592a\u5e73\u6d0b\u590f\u6642\u9593",
2030:                            "America/Los_Angeles" },
2031:                    // icu ja.txt has exemplar city for this time zone
2032:                    {
2033:                            "ja",
2034:                            "America/Los_Angeles",
2035:                            "2004-07-15T00:00:00Z",
2036:                            "v",
2037:                            "\u30ed\u30b5\u30f3\u30bc\u30eb\u30b9 (\u30A2\u30E1\u30EA\u30AB\u5408\u8846\u56FD)\u6642\u9593",
2038:                            "America/Los_Angeles" },
2039:                    {
2040:                            "ja",
2041:                            "America/Los_Angeles",
2042:                            "2004-07-15T00:00:00Z",
2043:                            "vvvv",
2044:                            "\u30ed\u30b5\u30f3\u30bc\u30eb\u30b9 (\u30A2\u30E1\u30EA\u30AB\u5408\u8846\u56FD)\u6642\u9593",
2045:                            "America/Los_Angeles" },
2046:
2047:                    { "ja", "America/Argentina/Buenos_Aires",
2048:                            "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
2049:                    { "ja", "America/Argentina/Buenos_Aires",
2050:                            "2004-01-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
2051:                    { "ja", "America/Argentina/Buenos_Aires",
2052:                            "2004-01-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
2053:                    { "ja", "America/Argentina/Buenos_Aires",
2054:                            "2004-01-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
2055:                    { "ja", "America/Argentina/Buenos_Aires",
2056:                            "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
2057:                    { "ja", "America/Argentina/Buenos_Aires",
2058:                            "2004-07-15T00:00:00Z", "ZZZZ", "GMT-0300", "-3:00" },
2059:                    { "ja", "America/Argentina/Buenos_Aires",
2060:                            "2004-07-15T00:00:00Z", "z", "GMT-0300", "-3:00" },
2061:                    { "ja", "America/Argentina/Buenos_Aires",
2062:                            "2004-07-15T00:00:00Z", "zzzz", "GMT-0300", "-3:00" },
2063:                    // icu ja.txt does not have info for this time zone
2064:                    {
2065:                            "ja",
2066:                            "America/Argentina/Buenos_Aires",
2067:                            "2004-07-15T00:00:00Z",
2068:                            "v",
2069:                            "\u30A2\u30E1\u30EA\u30AB/\u30D6\u30A8\u30CE\u30B9\u30A2\u30A4\u30EC\u30B9 (\u30a2\u30eb\u30bc\u30f3\u30c1\u30f3)\u6642\u9593",
2070:                            "America/Buenos_Aires" },
2071:                    {
2072:                            "ja",
2073:                            "America/Argentina/Buenos_Aires",
2074:                            "2004-07-15T00:00:00Z",
2075:                            "vvvv",
2076:                            "\u30A2\u30E1\u30EA\u30AB/\u30D6\u30A8\u30CE\u30B9\u30A2\u30A4\u30EC\u30B9 (\u30a2\u30eb\u30bc\u30f3\u30c1\u30f3)\u6642\u9593",
2077:                            "America/Buenos_Aires" },
2078:
2079:                    { "ja", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
2080:                            "Z", "-0300", "-3:00" },
2081:                    { "ja", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
2082:                            "ZZZZ", "GMT-0300", "-3:00" },
2083:                    { "ja", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
2084:                            "z", "GMT-0300", "-3:00" },
2085:                    { "ja", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
2086:                            "zzzz", "GMT-0300", "-3:00" },
2087:                    { "ja", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
2088:                            "Z", "-0300", "-3:00" },
2089:                    { "ja", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
2090:                            "ZZZZ", "GMT-0300", "-3:00" },
2091:                    { "ja", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
2092:                            "z", "GMT-0300", "-3:00" },
2093:                    { "ja", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
2094:                            "zzzz", "GMT-0300", "-3:00" },
2095:                    // icu ja.txt does not have info for this time zone
2096:                    {
2097:                            "ja",
2098:                            "America/Buenos_Aires",
2099:                            "2004-07-15T00:00:00Z",
2100:                            "v",
2101:                            "\u30A2\u30E1\u30EA\u30AB/\u30D6\u30A8\u30CE\u30B9\u30A2\u30A4\u30EC\u30B9 (\u30a2\u30eb\u30bc\u30f3\u30c1\u30f3)\u6642\u9593",
2102:                            "America/Buenos_Aires" },
2103:                    {
2104:                            "ja",
2105:                            "America/Buenos_Aires",
2106:                            "2004-07-15T00:00:00Z",
2107:                            "vvvv",
2108:                            "\u30A2\u30E1\u30EA\u30AB/\u30D6\u30A8\u30CE\u30B9\u30A2\u30A4\u30EC\u30B9 (\u30a2\u30eb\u30bc\u30f3\u30c1\u30f3)\u6642\u9593",
2109:                            "America/Buenos_Aires" },
2110:
2111:                    { "ja", "America/Havana", "2004-01-15T00:00:00Z", "Z",
2112:                            "-0500", "-5:00" },
2113:                    { "ja", "America/Havana", "2004-01-15T00:00:00Z", "ZZZZ",
2114:                            "GMT-0500", "-5:00" },
2115:                    { "ja", "America/Havana", "2004-01-15T00:00:00Z", "z",
2116:                            "GMT-0500", "-5:00" },
2117:                    { "ja", "America/Havana", "2004-01-15T00:00:00Z", "zzzz",
2118:                            "GMT-0500", "-5:00" },
2119:                    { "ja", "America/Havana", "2004-07-15T00:00:00Z", "Z",
2120:                            "-0400", "-4:00" },
2121:                    { "ja", "America/Havana", "2004-07-15T00:00:00Z", "ZZZZ",
2122:                            "GMT-0400", "-4:00" },
2123:                    { "ja", "America/Havana", "2004-07-15T00:00:00Z", "z",
2124:                            "GMT-0400", "-4:00" },
2125:                    { "ja", "America/Havana", "2004-07-15T00:00:00Z", "zzzz",
2126:                            "GMT-0400", "-4:00" },
2127:                    { "ja", "America/Havana", "2004-07-15T00:00:00Z", "v",
2128:                            "\u30ad\u30e5\u30fc\u30d0\u6642\u9593",
2129:                            "America/Havana" },
2130:                    { "ja", "America/Havana", "2004-07-15T00:00:00Z", "vvvv",
2131:                            "\u30ad\u30e5\u30fc\u30d0\u6642\u9593",
2132:                            "America/Havana" },
2133:
2134:                    { "ja", "Australia/ACT", "2004-01-15T00:00:00Z", "Z",
2135:                            "+1100", "+11:00" },
2136:                    { "ja", "Australia/ACT", "2004-01-15T00:00:00Z", "ZZZZ",
2137:                            "GMT+1100", "+11:00" },
2138:                    { "ja", "Australia/ACT", "2004-01-15T00:00:00Z", "z",
2139:                            "GMT+1100", "+11:00" },
2140:                    { "ja", "Australia/ACT", "2004-01-15T00:00:00Z", "zzzz",
2141:                            "GMT+1100", "+11:00" },
2142:                    { "ja", "Australia/ACT", "2004-07-15T00:00:00Z", "Z",
2143:                            "+1000", "+10:00" },
2144:                    { "ja", "Australia/ACT", "2004-07-15T00:00:00Z", "ZZZZ",
2145:                            "GMT+1000", "+10:00" },
2146:                    { "ja", "Australia/ACT", "2004-07-15T00:00:00Z", "z",
2147:                            "GMT+1000", "+10:00" },
2148:                    { "ja", "Australia/ACT", "2004-07-15T00:00:00Z", "zzzz",
2149:                            "GMT+1000", "+10:00" },
2150:                    // icu ja.txt does not have info for this time zone
2151:                    {
2152:                            "ja",
2153:                            "Australia/ACT",
2154:                            "2004-07-15T00:00:00Z",
2155:                            "v",
2156:                            "\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2/\u30B7\u30C9\u30CB\u30FC (\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)\u6642\u9593",
2157:                            "Australia/Sydney" },
2158:                    {
2159:                            "ja",
2160:                            "Australia/ACT",
2161:                            "2004-07-15T00:00:00Z",
2162:                            "vvvv",
2163:                            "\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2/\u30B7\u30C9\u30CB\u30FC (\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)\u6642\u9593",
2164:                            "Australia/Sydney" },
2165:
2166:                    { "ja", "Australia/Sydney", "2004-01-15T00:00:00Z", "Z",
2167:                            "+1100", "+11:00" },
2168:                    { "ja", "Australia/Sydney", "2004-01-15T00:00:00Z", "ZZZZ",
2169:                            "GMT+1100", "+11:00" },
2170:                    { "ja", "Australia/Sydney", "2004-01-15T00:00:00Z", "z",
2171:                            "GMT+1100", "+11:00" },
2172:                    { "ja", "Australia/Sydney", "2004-01-15T00:00:00Z", "zzzz",
2173:                            "GMT+1100", "+11:00" },
2174:                    { "ja", "Australia/Sydney", "2004-07-15T00:00:00Z", "Z",
2175:                            "+1000", "+10:00" },
2176:                    { "ja", "Australia/Sydney", "2004-07-15T00:00:00Z", "ZZZZ",
2177:                            "GMT+1000", "+10:00" },
2178:                    { "ja", "Australia/Sydney", "2004-07-15T00:00:00Z", "z",
2179:                            "GMT+1000", "+10:00" },
2180:                    { "ja", "Australia/Sydney", "2004-07-15T00:00:00Z", "zzzz",
2181:                            "GMT+1000", "+10:00" },
2182:                    {
2183:                            "ja",
2184:                            "Australia/Sydney",
2185:                            "2004-07-15T00:00:00Z",
2186:                            "v",
2187:                            "\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2/\u30B7\u30C9\u30CB\u30FC (\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)\u6642\u9593",
2188:                            "Australia/Sydney" },
2189:                    {
2190:                            "ja",
2191:                            "Australia/Sydney",
2192:                            "2004-07-15T00:00:00Z",
2193:                            "vvvv",
2194:                            "\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2/\u30B7\u30C9\u30CB\u30FC (\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)\u6642\u9593",
2195:                            "Australia/Sydney" },
2196:
2197:                    { "ja", "Europe/London", "2004-01-15T00:00:00Z", "Z",
2198:                            "+0000", "+0:00" },
2199:                    { "ja", "Europe/London", "2004-01-15T00:00:00Z", "ZZZZ",
2200:                            "GMT+0000", "+0:00" },
2201:                    { "ja", "Europe/London", "2004-01-15T00:00:00Z", "z",
2202:                            "GMT+0000", "+0:00" },
2203:                    { "ja", "Europe/London", "2004-01-15T00:00:00Z", "zzzz",
2204:                            "GMT+0000", "+0:00" },
2205:                    { "ja", "Europe/London", "2004-07-15T00:00:00Z", "Z",
2206:                            "+0100", "+1:00" },
2207:                    { "ja", "Europe/London", "2004-07-15T00:00:00Z", "ZZZZ",
2208:                            "GMT+0100", "+1:00" },
2209:                    { "ja", "Europe/London", "2004-07-15T00:00:00Z", "z",
2210:                            "GMT+0100", "+1:00" },
2211:                    { "ja", "Europe/London", "2004-07-15T00:00:00Z", "zzzz",
2212:                            "GMT+0100", "+1:00" },
2213:                    { "ja", "Europe/London", "2004-07-15T00:00:00Z", "v",
2214:                            "\u30a4\u30ae\u30ea\u30b9\u6642\u9593",
2215:                            "Europe/London" },
2216:                    { "ja", "Europe/London", "2004-07-15T00:00:00Z", "vvvv",
2217:                            "\u30a4\u30ae\u30ea\u30b9\u6642\u9593",
2218:                            "Europe/London" },
2219:
2220:                    { "ja", "Etc/GMT+3", "2004-01-15T00:00:00Z", "Z", "-0300",
2221:                            "-3:00" },
2222:                    { "ja", "Etc/GMT+3", "2004-01-15T00:00:00Z", "ZZZZ",
2223:                            "GMT-0300", "-3:00" },
2224:                    { "ja", "Etc/GMT+3", "2004-01-15T00:00:00Z", "z",
2225:                            "GMT-0300", "-3:00" },
2226:                    { "ja", "Etc/GMT+3", "2004-01-15T00:00:00Z", "zzzz",
2227:                            "GMT-0300", "-3:00" },
2228:                    { "ja", "Etc/GMT+3", "2004-07-15T00:00:00Z", "Z", "-0300",
2229:                            "-3:00" },
2230:                    { "ja", "Etc/GMT+3", "2004-07-15T00:00:00Z", "ZZZZ",
2231:                            "GMT-0300", "-3:00" },
2232:                    { "ja", "Etc/GMT+3", "2004-07-15T00:00:00Z", "z",
2233:                            "GMT-0300", "-3:00" },
2234:                    { "ja", "Etc/GMT+3", "2004-07-15T00:00:00Z", "zzzz",
2235:                            "GMT-0300", "-3:00" },
2236:                    { "ja", "Etc/GMT+3", "2004-07-15T00:00:00Z", "v",
2237:                            "GMT-0300", "-3:00" },
2238:                    { "ja", "Etc/GMT+3", "2004-07-15T00:00:00Z", "vvvv",
2239:                            "GMT-0300", "-3:00" },
2240:
2241:                    // JB#5150
2242:                    { "ja", "Asia/Calcutta", "2004-01-15T00:00:00Z", "Z",
2243:                            "+0530", "+5:30" },
2244:                    { "ja", "Asia/Calcutta", "2004-01-15T00:00:00Z", "ZZZZ",
2245:                            "GMT+0530", "+5:30" },
2246:                    { "ja", "Asia/Calcutta", "2004-01-15T00:00:00Z", "z",
2247:                            "GMT+0530", "+5:30" },
2248:                    { "ja", "Asia/Calcutta", "2004-01-15T00:00:00Z", "zzzz",
2249:                            "GMT+0530", "+5:30" },
2250:                    { "ja", "Asia/Calcutta", "2004-07-15T00:00:00Z", "Z",
2251:                            "+0530", "+5:30" },
2252:                    { "ja", "Asia/Calcutta", "2004-07-15T00:00:00Z", "ZZZZ",
2253:                            "GMT+0530", "+5:30" },
2254:                    { "ja", "Asia/Calcutta", "2004-07-15T00:00:00Z", "z",
2255:                            "GMT+0530", "+05:30" },
2256:                    { "ja", "Asia/Calcutta", "2004-07-15T00:00:00Z", "zzzz",
2257:                            "GMT+0530", "+5:30" },
2258:                    { "ja", "Asia/Calcutta", "2004-07-15T00:00:00Z", "v",
2259:                            "\u30A4\u30F3\u30C9\u6642\u9593", "Asia/Calcutta" },
2260:                    { "ja", "Asia/Calcutta", "2004-07-15T00:00:00Z", "vvvv",
2261:                            "\u30A4\u30F3\u30C9\u6642\u9593", "Asia/Calcutta" },
2262:
2263:                    // ==========
2264:
2265:                    { "as", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z",
2266:                            "-0800", "-8:00" },
2267:                    { "as", "America/Los_Angeles", "2004-01-15T00:00:00Z",
2268:                            "ZZZZ", "GMT-08:00", "-8:00" },
2269:                    { "as", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z",
2270:                            "GMT-08:00", "-8:00" },
2271:                    { "as", "America/Los_Angeles", "2004-01-15T00:00:00Z",
2272:                            "zzzz", "GMT-08:00", "-8:00" },
2273:                    { "as", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z",
2274:                            "-0700", "-7:00" },
2275:                    { "as", "America/Los_Angeles", "2004-07-15T00:00:00Z",
2276:                            "ZZZZ", "GMT-07:00", "-7:00" },
2277:                    { "as", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z",
2278:                            "GMT-07:00", "-7:00" },
2279:                    { "as", "America/Los_Angeles", "2004-07-15T00:00:00Z",
2280:                            "zzzz", "GMT-07:00", "-7:00" },
2281:                    { "as", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v",
2282:                            "Los Angeles (US)", "America/Los_Angeles" },
2283:                    { "as", "America/Los_Angeles", "2004-07-15T00:00:00Z",
2284:                            "vvvv", "Los Angeles (US)", "America/Los_Angeles" },
2285:
2286:                    { "as", "America/Argentina/Buenos_Aires",
2287:                            "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
2288:                    { "as", "America/Argentina/Buenos_Aires",
2289:                            "2004-01-15T00:00:00Z", "ZZZZ", "GMT-03:00",
2290:                            "-3:00" },
2291:                    { "as", "America/Argentina/Buenos_Aires",
2292:                            "2004-01-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
2293:                    { "as", "America/Argentina/Buenos_Aires",
2294:                            "2004-01-15T00:00:00Z", "zzzz", "GMT-03:00",
2295:                            "-3:00" },
2296:                    { "as", "America/Argentina/Buenos_Aires",
2297:                            "2004-07-15T00:00:00Z", "Z", "-0300", "-3:00" },
2298:                    { "as", "America/Argentina/Buenos_Aires",
2299:                            "2004-07-15T00:00:00Z", "ZZZZ", "GMT-03:00",
2300:                            "-3:00" },
2301:                    { "as", "America/Argentina/Buenos_Aires",
2302:                            "2004-07-15T00:00:00Z", "z", "GMT-03:00", "-3:00" },
2303:                    { "as", "America/Argentina/Buenos_Aires",
2304:                            "2004-07-15T00:00:00Z", "zzzz", "GMT-03:00",
2305:                            "-3:00" },
2306:                    { "as", "America/Argentina/Buenos_Aires",
2307:                            "2004-07-15T00:00:00Z", "v", "Buenos Aires (AR)",
2308:                            "America/Buenos_Aires" },
2309:                    { "as", "America/Argentina/Buenos_Aires",
2310:                            "2004-07-15T00:00:00Z", "vvvv",
2311:                            "Buenos Aires (AR)", "America/Buenos_Aires" },
2312:
2313:                    { "as", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
2314:                            "Z", "-0300", "-3:00" },
2315:                    { "as", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
2316:                            "ZZZZ", "GMT-03:00", "-3:00" },
2317:                    { "as", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
2318:                            "z", "GMT-03:00", "-3:00" },
2319:                    { "as", "America/Buenos_Aires", "2004-01-15T00:00:00Z",
2320:                            "zzzz", "GMT-03:00", "-3:00" },
2321:                    { "as", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
2322:                            "Z", "-0300", "-3:00" },
2323:                    { "as", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
2324:                            "ZZZZ", "GMT-03:00", "-3:00" },
2325:                    { "as", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
2326:                            "z", "GMT-03:00", "-3:00" },
2327:                    { "as", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
2328:                            "zzzz", "GMT-03:00", "-3:00" },
2329:                    { "as", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
2330:                            "v", "Buenos Aires (AR)", "America/Buenos_Aires" },
2331:                    { "as", "America/Buenos_Aires", "2004-07-15T00:00:00Z",
2332:                            "vvvv", "Buenos Aires (AR)", "America/Buenos_Aires" },
2333:
2334:                    { "as", "America/Havana", "2004-01-15T00:00:00Z", "Z",
2335:                            "-0500", "-5:00" },
2336:                    { "as", "America/Havana", "2004-01-15T00:00:00Z", "ZZZZ",
2337:                            "GMT-05:00", "-5:00" },
2338:                    { "as", "America/Havana", "2004-01-15T00:00:00Z", "z",
2339:                            "GMT-05:00", "-5:00" },
2340:                    { "as", "America/Havana", "2004-01-15T00:00:00Z", "zzzz",
2341:                            "GMT-05:00", "-5:00" },
2342:                    { "as", "America/Havana", "2004-07-15T00:00:00Z", "Z",
2343:                            "-0400", "-4:00" },
2344:                    { "as", "America/Havana", "2004-07-15T00:00:00Z", "ZZZZ",
2345:                            "GMT-04:00", "-4:00" },
2346:                    { "as", "America/Havana", "2004-07-15T00:00:00Z", "z",
2347:                            "GMT-04:00", "-4:00" },
2348:                    { "as", "America/Havana", "2004-07-15T00:00:00Z", "zzzz",
2349:                            "GMT-04:00", "-4:00" },
2350:                    { "as", "America/Havana", "2004-07-15T00:00:00Z", "v",
2351:                            "CU", "America/Havana" },
2352:                    { "as", "America/Havana", "2004-07-15T00:00:00Z", "vvvv",
2353:                            "CU", "America/Havana" },
2354:
2355:                    { "as", "Australia/ACT", "2004-01-15T00:00:00Z", "Z",
2356:                            "+1100", "+11:00" },
2357:                    { "as", "Australia/ACT", "2004-01-15T00:00:00Z", "ZZZZ",
2358:                            "GMT+11:00", "+11:00" },
2359:                    { "as", "Australia/ACT", "2004-01-15T00:00:00Z", "z",
2360:                            "GMT+11:00", "+11:00" },
2361:                    { "as", "Australia/ACT", "2004-01-15T00:00:00Z", "zzzz",
2362:                            "GMT+11:00", "+11:00" },
2363:                    { "as", "Australia/ACT", "2004-07-15T00:00:00Z", "Z",
2364:                            "+1000", "+10:00" },
2365:                    { "as", "Australia/ACT", "2004-07-15T00:00:00Z", "ZZZZ",
2366:                            "GMT+10:00", "+10:00" },
2367:                    { "as", "Australia/ACT", "2004-07-15T00:00:00Z", "z",
2368:                            "GMT+10:00", "+10:00" },
2369:                    { "as", "Australia/ACT", "2004-07-15T00:00:00Z", "zzzz",
2370:                            "GMT+10:00", "+10:00" },
2371:                    { "as", "Australia/ACT", "2004-07-15T00:00:00Z", "v",
2372:                            "Sydney (AU)", "Australia/Sydney" },
2373:                    { "as", "Australia/ACT", "2004-07-15T00:00:00Z", "vvvv",
2374:                            "Sydney (AU)", "Australia/Sydney" },
2375:
2376:                    { "as", "Australia/Sydney", "2004-01-15T00:00:00Z", "Z",
2377:                            "+1100", "+11:00" },
2378:                    { "as", "Australia/Sydney", "2004-01-15T00:00:00Z", "ZZZZ",
2379:                            "GMT+11:00", "+11:00" },
2380:                    { "as", "Australia/Sydney", "2004-01-15T00:00:00Z", "z",
2381:                            "GMT+11:00", "+11:00" },
2382:                    { "as", "Australia/Sydney", "2004-01-15T00:00:00Z", "zzzz",
2383:                            "GMT+11:00", "+11:00" },
2384:                    { "as", "Australia/Sydney", "2004-07-15T00:00:00Z", "Z",
2385:                            "+1000", "+10:00" },
2386:                    { "as", "Australia/Sydney", "2004-07-15T00:00:00Z", "ZZZZ",
2387:                            "GMT+10:00", "+10:00" },
2388:                    { "as", "Australia/Sydney", "2004-07-15T00:00:00Z", "z",
2389:                            "GMT+10:00", "+10:00" },
2390:                    { "as", "Australia/Sydney", "2004-07-15T00:00:00Z", "zzzz",
2391:                            "GMT+10:00", "+10:00" },
2392:                    { "as", "Australia/Sydney", "2004-07-15T00:00:00Z", "v",
2393:                            "Sydney (AU)", "Australia/Sydney" },
2394:                    { "as", "Australia/Sydney", "2004-07-15T00:00:00Z", "vvvv",
2395:                            "Sydney (AU)", "Australia/Sydney" },
2396:
2397:                    { "as", "Europe/London", "2004-01-15T00:00:00Z", "Z",
2398:                            "+0000", "+0:00" },
2399:                    { "as", "Europe/London", "2004-01-15T00:00:00Z", "ZZZZ",
2400:                            "GMT+00:00", "+0:00" },
2401:                    { "as", "Europe/London", "2004-01-15T00:00:00Z", "z",
2402:                            "GMT+00:00", "+0:00" },
2403:                    { "as", "Europe/London", "2004-01-15T00:00:00Z", "zzzz",
2404:                            "GMT+00:00", "+0:00" },
2405:                    { "as", "Europe/London", "2004-07-15T00:00:00Z", "Z",
2406:                            "+0100", "+1:00" },
2407:                    { "as", "Europe/London", "2004-07-15T00:00:00Z", "ZZZZ",
2408:                            "GMT+01:00", "+1:00" },
2409:                    { "as", "Europe/London", "2004-07-15T00:00:00Z", "z",
2410:                            "GMT+01:00", "+1:00" },
2411:                    { "as", "Europe/London", "2004-07-15T00:00:00Z", "zzzz",
2412:                            "GMT+01:00", "+1:00" },
2413:                    { "as", "Europe/London", "2004-07-15T00:00:00Z", "v", "GB",
2414:                            "Europe/London" },
2415:                    { "as", "Europe/London", "2004-07-15T00:00:00Z", "vvvv",
2416:                            "GB", "Europe/London" },
2417:
2418:                    { "as", "Etc/GMT+3", "2004-01-15T00:00:00Z", "Z", "-0300",
2419:                            "-3:00" },
2420:                    { "as", "Etc/GMT+3", "2004-01-15T00:00:00Z", "ZZZZ",
2421:                            "GMT-03:00", "-3:00" },
2422:                    { "as", "Etc/GMT+3", "2004-01-15T00:00:00Z", "z",
2423:                            "GMT-03:00", "-3:00" },
2424:                    { "as", "Etc/GMT+3", "2004-01-15T00:00:00Z", "zzzz",
2425:                            "GMT-03:00", "-3:00" },
2426:                    { "as", "Etc/GMT+3", "2004-07-15T00:00:00Z", "Z", "-0300",
2427:                            "-3:00" },
2428:                    { "as", "Etc/GMT+3", "2004-07-15T00:00:00Z", "ZZZZ",
2429:                            "GMT-03:00", "-3:00" },
2430:                    { "as", "Etc/GMT+3", "2004-07-15T00:00:00Z", "z",
2431:                            "GMT-03:00", "-3:00" },
2432:                    { "as", "Etc/GMT+3", "2004-07-15T00:00:00Z", "zzzz",
2433:                            "GMT-03:00", "-3:00" },
2434:                    { "as", "Etc/GMT+3", "2004-07-15T00:00:00Z", "v",
2435:                            "GMT-03:00", "-3:00" },
2436:                    { "as", "Etc/GMT+3", "2004-07-15T00:00:00Z", "vvvv",
2437:                            "GMT-03:00", "-3:00" },
2438:
2439:                    // JB#5150
2440:                    { "as", "Asia/Calcutta", "2004-01-15T00:00:00Z", "Z",
2441:                            "+0530", "+5:30" },
2442:                    { "as", "Asia/Calcutta", "2004-01-15T00:00:00Z", "ZZZZ",
2443:                            "GMT+05:30", "+5:30" },
2444:                    { "as", "Asia/Calcutta", "2004-01-15T00:00:00Z", "z",
2445:                            "\u09AD\u09BE. \u09B8.", "+5:30" },
2446:                    {
2447:                            "as",
2448:                            "Asia/Calcutta",
2449:                            "2004-01-15T00:00:00Z",
2450:                            "zzzz",
2451:                            "\u09AD\u09BE\u09F0\u09A4\u09C0\u09AF\u09BC \u09B8\u09AE\u09AF\u09BC",
2452:                            "+5:30" },
2453:                    { "as", "Asia/Calcutta", "2004-07-15T00:00:00Z", "Z",
2454:                            "+0530", "+5:30" },
2455:                    { "as", "Asia/Calcutta", "2004-07-15T00:00:00Z", "ZZZZ",
2456:                            "GMT+05:30", "+5:30" },
2457:                    { "as", "Asia/Calcutta", "2004-07-15T00:00:00Z", "z",
2458:                            "\u09AD\u09BE. \u09B8.", "+05:30" },
2459:                    {
2460:                            "as",
2461:                            "Asia/Calcutta",
2462:                            "2004-07-15T00:00:00Z",
2463:                            "zzzz",
2464:                            "\u09AD\u09BE\u09F0\u09A4\u09C0\u09AF\u09BC \u09B8\u09AE\u09AF\u09BC",
2465:                            "+5:30" },
2466:                    { "as", "Asia/Calcutta", "2004-07-15T00:00:00Z", "v",
2467:                            "\u09AD\u09BE\u09F0\u09A4", "Asia/Calcutta" },
2468:                    { "as", "Asia/Calcutta", "2004-07-15T00:00:00Z", "vvvv",
2469:                            "\u09AD\u09BE\u09F0\u09A4", "Asia/Calcutta" },
2470:
2471:            };
2472:
2473:            /**
2474:             * Verify that strings which contain incomplete specifications are parsed
2475:             * correctly.  In some instances, this means not being parsed at all, and
2476:             * returning an appropriate error.
2477:             */
2478:            public void TestPartialParse994() {
2479:
2480:                SimpleDateFormat f = new SimpleDateFormat();
2481:                Calendar cal = Calendar.getInstance();
2482:                cal.clear();
2483:                cal.set(1997, 1 - 1, 17, 10, 11, 42);
2484:                Date date = null;
2485:                tryPat994(f, "yy/MM/dd HH:mm:ss", "97/01/17 10:11:42", cal
2486:                        .getTime());
2487:                tryPat994(f, "yy/MM/dd HH:mm:ss", "97/01/17 10:", date);
2488:                tryPat994(f, "yy/MM/dd HH:mm:ss", "97/01/17 10", date);
2489:                tryPat994(f, "yy/MM/dd HH:mm:ss", "97/01/17 ", date);
2490:                tryPat994(f, "yy/MM/dd HH:mm:ss", "97/01/17", date);
2491:            }
2492:
2493:            // internal test subroutine, used by TestPartialParse994
2494:            public void tryPat994(SimpleDateFormat format, String pat,
2495:                    String str, Date expected) {
2496:                Date Null = null;
2497:                logln("Pattern \"" + pat + "\"   String \"" + str + "\"");
2498:                try {
2499:                    format.applyPattern(pat);
2500:                    Date date = format.parse(str);
2501:                    String f = ((DateFormat) format).format(date);
2502:                    logln(" parse(" + str + ") -> " + date);
2503:                    logln(" format -> " + f);
2504:                    if (expected.equals(Null) || !date.equals(expected))
2505:                        errln("FAIL: Expected null"); //" + expected);
2506:                    if (!f.equals(str))
2507:                        errln("FAIL: Expected " + str);
2508:                } catch (ParseException e) {
2509:                    logln("ParseException: " + e.getMessage());
2510:                    if (!(expected == Null))
2511:                        errln("FAIL: Expected " + expected);
2512:                } catch (Exception e) {
2513:                    errln("*** Exception:");
2514:                    e.printStackTrace();
2515:                }
2516:            }
2517:
2518:            /**
2519:             * Verify the behavior of patterns in which digits for different fields run together
2520:             * without intervening separators.
2521:             */
2522:            public void TestRunTogetherPattern985() {
2523:                String format = "yyyyMMddHHmmssSSS";
2524:                String now, then;
2525:                //UBool flag;
2526:                SimpleDateFormat formatter = new SimpleDateFormat(format);
2527:                Date date1 = new Date();
2528:                now = ((DateFormat) formatter).format(date1);
2529:                logln(now);
2530:                ParsePosition pos = new ParsePosition(0);
2531:                Date date2 = formatter.parse(now, pos);
2532:                if (date2 == null)
2533:                    then = "Parse stopped at " + pos.getIndex();
2534:                else
2535:                    then = ((DateFormat) formatter).format(date2);
2536:                logln(then);
2537:                if (date2 == null || !date2.equals(date1))
2538:                    errln("FAIL");
2539:            }
2540:
2541:            /**
2542:             * Verify the behavior of patterns in which digits for different fields run together
2543:             * without intervening separators.
2544:             */
2545:            public void TestRunTogetherPattern917() {
2546:                SimpleDateFormat fmt;
2547:                String myDate;
2548:                fmt = new SimpleDateFormat("yyyy/MM/dd");
2549:                myDate = "1997/02/03";
2550:                Calendar cal = Calendar.getInstance();
2551:                cal.clear();
2552:                cal.set(1997, 2 - 1, 3);
2553:                _testIt917(fmt, myDate, cal.getTime());
2554:                fmt = new SimpleDateFormat("yyyyMMdd");
2555:                myDate = "19970304";
2556:                cal.clear();
2557:                cal.set(1997, 3 - 1, 4);
2558:                _testIt917(fmt, myDate, cal.getTime());
2559:
2560:            }
2561:
2562:            // internal test subroutine, used by TestRunTogetherPattern917
2563:            public void _testIt917(SimpleDateFormat fmt, String str,
2564:                    Date expected) {
2565:                logln("pattern=" + fmt.toPattern() + "   string=" + str);
2566:                Date o = new Date();
2567:                o = (Date) ((DateFormat) fmt).parseObject(str,
2568:                        new ParsePosition(0));
2569:                logln("Parsed object: " + o);
2570:                if (o == null || !o.equals(expected))
2571:                    errln("FAIL: Expected " + expected);
2572:                String formatted = o == null ? "null" : ((DateFormat) fmt)
2573:                        .format(o);
2574:                logln("Formatted string: " + formatted);
2575:                if (!formatted.equals(str))
2576:                    errln("FAIL: Expected " + str);
2577:            }
2578:
2579:            /**
2580:             * Verify the handling of Czech June and July, which have the unique attribute that
2581:             * one is a proper prefix substring of the other.
2582:             */
2583:            public void TestCzechMonths459() {
2584:                DateFormat fmt = DateFormat.getDateInstance(DateFormat.FULL,
2585:                        new Locale("cs", "", ""));
2586:                logln("Pattern " + ((SimpleDateFormat) fmt).toPattern());
2587:                Calendar cal = Calendar.getInstance();
2588:                cal.clear();
2589:                cal.set(1997, Calendar.JUNE, 15);
2590:                Date june = cal.getTime();
2591:                cal.clear();
2592:                cal.set(1997, Calendar.JULY, 15);
2593:                Date july = cal.getTime();
2594:                String juneStr = fmt.format(june);
2595:                String julyStr = fmt.format(july);
2596:                try {
2597:                    logln("format(June 15 1997) = " + juneStr);
2598:                    Date d = fmt.parse(juneStr);
2599:                    String s = fmt.format(d);
2600:                    int month, yr, day, hr, min, sec;
2601:                    cal.setTime(d);
2602:                    yr = cal.get(Calendar.YEAR) - 1900;
2603:                    month = cal.get(Calendar.MONTH);
2604:                    day = cal.get(Calendar.DAY_OF_WEEK);
2605:                    hr = cal.get(Calendar.HOUR_OF_DAY);
2606:                    min = cal.get(Calendar.MINUTE);
2607:                    sec = cal.get(Calendar.SECOND);
2608:                    logln("  . parse . " + s + " (month = " + month + ")");
2609:                    if (month != Calendar.JUNE)
2610:                        errln("FAIL: Month should be June");
2611:                    logln("format(July 15 1997) = " + julyStr);
2612:                    d = fmt.parse(julyStr);
2613:                    s = fmt.format(d);
2614:                    cal.setTime(d);
2615:                    yr = cal.get(Calendar.YEAR) - 1900;
2616:                    month = cal.get(Calendar.MONTH);
2617:                    day = cal.get(Calendar.DAY_OF_WEEK);
2618:                    hr = cal.get(Calendar.HOUR_OF_DAY);
2619:                    min = cal.get(Calendar.MINUTE);
2620:                    sec = cal.get(Calendar.SECOND);
2621:                    logln("  . parse . " + s + " (month = " + month + ")");
2622:                    if (month != Calendar.JULY)
2623:                        errln("FAIL: Month should be July");
2624:                } catch (ParseException e) {
2625:                    errln(e.getMessage());
2626:                }
2627:            }
2628:
2629:            /**
2630:             * Test the handling of 'D' in patterns.
2631:             */
2632:            public void TestLetterDPattern212() {
2633:                String dateString = "1995-040.05:01:29";
2634:                String bigD = "yyyy-DDD.hh:mm:ss";
2635:                String littleD = "yyyy-ddd.hh:mm:ss";
2636:                Calendar cal = Calendar.getInstance();
2637:                cal.clear();
2638:                cal.set(1995, 0, 1, 5, 1, 29);
2639:                Date expLittleD = cal.getTime();
2640:                Date expBigD = new Date(
2641:                        (long) (expLittleD.getTime() + 39 * 24 * 3600000.0));
2642:                expLittleD = expBigD; // Expect the same, with default lenient parsing
2643:                logln("dateString= " + dateString);
2644:                SimpleDateFormat formatter = new SimpleDateFormat(bigD);
2645:                ParsePosition pos = new ParsePosition(0);
2646:                Date myDate = formatter.parse(dateString, pos);
2647:                logln("Using " + bigD + " . " + myDate);
2648:                if (!myDate.equals(expBigD))
2649:                    errln("FAIL: Expected " + expBigD);
2650:                formatter = new SimpleDateFormat(littleD);
2651:                pos = new ParsePosition(0);
2652:                myDate = formatter.parse(dateString, pos);
2653:                logln("Using " + littleD + " . " + myDate);
2654:                if (!myDate.equals(expLittleD))
2655:                    errln("FAIL: Expected " + expLittleD);
2656:            }
2657:
2658:            /**
2659:             * Test the day of year pattern.
2660:             */
2661:            public void TestDayOfYearPattern195() {
2662:                Calendar cal = Calendar.getInstance();
2663:                Date today = cal.getTime();
2664:                int year, month, day;
2665:                year = cal.get(Calendar.YEAR);
2666:                month = cal.get(Calendar.MONTH);
2667:                day = cal.get(Calendar.DAY_OF_MONTH);
2668:                cal.clear();
2669:                cal.set(year, month, day);
2670:                Date expected = cal.getTime();
2671:                logln("Test Date: " + today);
2672:                SimpleDateFormat sdf = (SimpleDateFormat) DateFormat
2673:                        .getDateInstance();
2674:                tryPattern(sdf, today, null, expected);
2675:                tryPattern(sdf, today, "G yyyy DDD", expected);
2676:            }
2677:
2678:            // interl test subroutine, used by TestDayOfYearPattern195
2679:            public void tryPattern(SimpleDateFormat sdf, Date d,
2680:                    String pattern, Date expected) {
2681:                if (pattern != null)
2682:                    sdf.applyPattern(pattern);
2683:                logln("pattern: " + sdf.toPattern());
2684:                String formatResult = ((DateFormat) sdf).format(d);
2685:                logln(" format -> " + formatResult);
2686:                try {
2687:                    Date d2 = sdf.parse(formatResult);
2688:                    logln(" parse(" + formatResult + ") -> " + d2);
2689:                    if (!d2.equals(expected))
2690:                        errln("FAIL: Expected " + expected);
2691:                    String format2 = ((DateFormat) sdf).format(d2);
2692:                    logln(" format -> " + format2);
2693:                    if (!formatResult.equals(format2))
2694:                        errln("FAIL: Round trip drift");
2695:                } catch (Exception e) {
2696:                    errln(e.getMessage());
2697:                }
2698:            }
2699:
2700:            /**
2701:             * Test the handling of single quotes in patterns.
2702:             */
2703:            public void TestQuotePattern161() {
2704:                SimpleDateFormat formatter = new SimpleDateFormat(
2705:                        "MM/dd/yyyy 'at' hh:mm:ss a zzz", Locale.US);
2706:                Calendar cal = Calendar.getInstance();
2707:                cal.clear();
2708:                cal.set(1997, Calendar.AUGUST, 13, 10, 42, 28);
2709:                Date currentTime_1 = cal.getTime();
2710:                String dateString = ((DateFormat) formatter)
2711:                        .format(currentTime_1);
2712:                String exp = "08/13/1997 at 10:42:28 AM ";
2713:                logln("format(" + currentTime_1 + ") = " + dateString);
2714:                if (!dateString.substring(0, exp.length()).equals(exp))
2715:                    errln("FAIL: Expected " + exp);
2716:
2717:            }
2718:
2719:            /**
2720:             * Verify the correct behavior when handling invalid input strings.
2721:             */
2722:            public void TestBadInput135() {
2723:                int looks[] = { DateFormat.SHORT, DateFormat.MEDIUM,
2724:                        DateFormat.LONG, DateFormat.FULL };
2725:                int looks_length = looks.length;
2726:                final String[] strings = { "Mar 15", "Mar 15 1997", "asdf",
2727:                        "3/1/97 1:23:", "3/1/00 1:23:45 AM" };
2728:                int strings_length = strings.length;
2729:                DateFormat full = DateFormat.getDateTimeInstance(
2730:                        DateFormat.LONG, DateFormat.LONG, Locale.US);
2731:                String expected = "March 1, 2000 1:23:45 AM ";
2732:                for (int i = 0; i < strings_length; ++i) {
2733:                    final String text = strings[i];
2734:                    for (int j = 0; j < looks_length; ++j) {
2735:                        int dateLook = looks[j];
2736:                        for (int k = 0; k < looks_length; ++k) {
2737:                            int timeLook = looks[k];
2738:                            DateFormat df = DateFormat.getDateTimeInstance(
2739:                                    dateLook, timeLook, Locale.US);
2740:                            String prefix = text + ", " + dateLook + "/"
2741:                                    + timeLook + ": ";
2742:                            try {
2743:                                Date when = df.parse(text);
2744:                                if (when == null) {
2745:                                    errln(prefix
2746:                                            + "SHOULD NOT HAPPEN: parse returned null.");
2747:                                    continue;
2748:                                }
2749:                                if (when != null) {
2750:                                    String format;
2751:                                    format = full.format(when);
2752:                                    logln(prefix + "OK: " + format);
2753:                                    if (!format.substring(0, expected.length())
2754:                                            .equals(expected))
2755:                                        errln("FAIL: Expected " + expected);
2756:                                }
2757:                            } catch (java.text.ParseException e) {
2758:                                logln(e.getMessage());
2759:                            }
2760:                        }
2761:                    }
2762:                }
2763:            }
2764:
2765:            /**
2766:             * Verify the correct behavior when parsing an array of inputs against an
2767:             * array of patterns, with known results.  The results are encoded after
2768:             * the input strings in each row.
2769:             */
2770:            public void TestBadInput135a() {
2771:
2772:                SimpleDateFormat dateParse = new SimpleDateFormat("", Locale.US);
2773:                final String ss;
2774:                Date date;
2775:                String[] parseFormats = { "MMMM d, yyyy", "MMMM d yyyy",
2776:                        "M/d/yy", "d MMMM, yyyy", "d MMMM yyyy", "d MMMM",
2777:                        "MMMM d", "yyyy", "h:mm a MMMM d, yyyy" };
2778:                String[] inputStrings = { "bogus string", null, null, null,
2779:                        null, null, null, null, null, null, "April 1, 1997",
2780:                        "April 1, 1997", null, null, null, null, null,
2781:                        "April 1", null, null, "Jan 1, 1970",
2782:                        "January 1, 1970", null, null, null, null, null,
2783:                        "January 1", null, null, "Jan 1 2037", null,
2784:                        "January 1 2037", null, null, null, null, "January 1",
2785:                        null, null, "1/1/70", null, null, "1/1/70", null, null,
2786:                        null, null, "0001", null, "5 May 1997", null, null,
2787:                        null, null, "5 May 1997", "5 May", null, "0005", null,
2788:                        "16 May", null, null, null, null, null, "16 May", null,
2789:                        "0016", null, "April 30", null, null, null, null, null,
2790:                        null, "April 30", null, null, "1998", null, null, null,
2791:                        null, null, null, null, "1998", null, "1", null, null,
2792:                        null, null, null, null, null, "0001", null,
2793:                        "3:00 pm Jan 1, 1997", null, null, null, null, null,
2794:                        null, null, "0003", "3:00 PM January 1, 1997", };
2795:                final int PF_LENGTH = parseFormats.length;
2796:                final int INPUT_LENGTH = inputStrings.length;
2797:
2798:                dateParse.applyPattern("d MMMM, yyyy");
2799:                dateParse.setTimeZone(TimeZone.getDefault());
2800:                ss = "not parseable";
2801:                //    String thePat;
2802:                logln("Trying to parse \"" + ss + "\" with "
2803:                        + dateParse.toPattern());
2804:                try {
2805:                    date = dateParse.parse(ss);
2806:                } catch (Exception ex) {
2807:                    logln("FAIL:" + ex);
2808:                }
2809:                for (int i = 0; i < INPUT_LENGTH; i += (PF_LENGTH + 1)) {
2810:                    ParsePosition parsePosition = new ParsePosition(0);
2811:                    String s = inputStrings[i];
2812:                    for (int index = 0; index < PF_LENGTH; ++index) {
2813:                        final String expected = inputStrings[i + 1 + index];
2814:                        dateParse.applyPattern(parseFormats[index]);
2815:                        dateParse.setTimeZone(TimeZone.getDefault());
2816:                        try {
2817:                            parsePosition.setIndex(0);
2818:                            date = dateParse.parse(s, parsePosition);
2819:                            if (parsePosition.getIndex() != 0) {
2820:                                String s1, s2;
2821:                                s1 = s.substring(0, parsePosition.getIndex());
2822:                                s2 = s.substring(parsePosition.getIndex(), s
2823:                                        .length());
2824:                                if (date == null) {
2825:                                    errln("ERROR: null result fmt=\""
2826:                                            + parseFormats[index] + "\" pos="
2827:                                            + parsePosition.getIndex() + " "
2828:                                            + s1 + "|" + s2);
2829:                                } else {
2830:                                    String result = ((DateFormat) dateParse)
2831:                                            .format(date);
2832:                                    logln("Parsed \"" + s + "\" using \""
2833:                                            + dateParse.toPattern() + "\" to: "
2834:                                            + result);
2835:                                    if (expected == null)
2836:                                        errln("FAIL: Expected parse failure");
2837:                                    else if (!result.equals(expected))
2838:                                        errln("FAIL: Expected " + expected);
2839:                                }
2840:                            } else if (expected != null) {
2841:                                errln("FAIL: Expected " + expected + " from \""
2842:                                        + s + "\" with \""
2843:                                        + dateParse.toPattern() + "\"");
2844:                            }
2845:                        } catch (Exception ex) {
2846:                            logln("FAIL:" + ex);
2847:                        }
2848:                    }
2849:                }
2850:
2851:            }
2852:
2853:            /**
2854:             * Test the parsing of two-digit years.
2855:             */
2856:            public void TestTwoDigitYear() {
2857:                DateFormat fmt = DateFormat.getDateInstance(DateFormat.SHORT,
2858:                        Locale.US);
2859:                Calendar cal = Calendar.getInstance();
2860:                cal.clear();
2861:                cal.set(117 + 1900, Calendar.JUNE, 5);
2862:                parse2DigitYear(fmt, "6/5/17", cal.getTime());
2863:                cal.clear();
2864:                cal.set(34 + 1900, Calendar.JUNE, 4);
2865:                parse2DigitYear(fmt, "6/4/34", cal.getTime());
2866:            }
2867:
2868:            // internal test subroutine, used by TestTwoDigitYear
2869:            public void parse2DigitYear(DateFormat fmt, String str,
2870:                    Date expected) {
2871:                try {
2872:                    Date d = fmt.parse(str);
2873:                    logln("Parsing \"" + str + "\" with "
2874:                            + ((SimpleDateFormat) fmt).toPattern() + "  => "
2875:                            + d);
2876:                    if (!d.equals(expected))
2877:                        errln("FAIL: Expected " + expected);
2878:                } catch (ParseException e) {
2879:                    errln(e.getMessage());
2880:                }
2881:            }
2882:
2883:            /**
2884:             * Test the formatting of time zones.
2885:             */
2886:            public void TestDateFormatZone061() {
2887:                Date date;
2888:                DateFormat formatter;
2889:                date = new Date(859248000000l);
2890:                logln("Date 1997/3/25 00:00 GMT: " + date);
2891:                formatter = new SimpleDateFormat("dd-MMM-yyyyy HH:mm",
2892:                        Locale.UK);
2893:                formatter.setTimeZone(TimeZone.getTimeZone("GMT"));
2894:                String temp = formatter.format(date);
2895:                logln("Formatted in GMT to: " + temp);
2896:                try {
2897:                    Date tempDate = formatter.parse(temp);
2898:                    logln("Parsed to: " + tempDate);
2899:                    if (!tempDate.equals(date))
2900:                        errln("FAIL: Expected " + date + " Got: " + tempDate);
2901:                } catch (Throwable t) {
2902:                    System.out.println(t);
2903:                }
2904:
2905:            }
2906:
2907:            /**
2908:             * Test the formatting of time zones.
2909:             */
2910:            public void TestDateFormatZone146() {
2911:                TimeZone saveDefault = TimeZone.getDefault();
2912:
2913:                //try {
2914:                TimeZone thedefault = TimeZone.getTimeZone("GMT");
2915:                TimeZone.setDefault(thedefault);
2916:                // java.util.Locale.setDefault(new java.util.Locale("ar", "", ""));
2917:
2918:                // check to be sure... its GMT all right
2919:                TimeZone testdefault = TimeZone.getDefault();
2920:                String testtimezone = testdefault.getID();
2921:                if (testtimezone.equals("GMT"))
2922:                    logln("Test timezone = " + testtimezone);
2923:                else
2924:                    errln("Test timezone should be GMT, not " + testtimezone);
2925:
2926:                // now try to use the default GMT time zone
2927:                GregorianCalendar greenwichcalendar = new GregorianCalendar(
2928:                        1997, 3, 4, 23, 0);
2929:                //*****************************greenwichcalendar.setTimeZone(TimeZone.getDefault());
2930:                //greenwichcalendar.set(1997, 3, 4, 23, 0);
2931:                // try anything to set hour to 23:00 !!!
2932:                greenwichcalendar.set(Calendar.HOUR_OF_DAY, 23);
2933:                // get time
2934:                Date greenwichdate = greenwichcalendar.getTime();
2935:                // format every way
2936:                String DATA[] = { "simple format:  ",
2937:                        "04/04/97 23:00 GMT+00:00", "MM/dd/yy HH:mm zzz",
2938:                        "full format:    ",
2939:                        "Friday, April 4, 1997 11:00:00 o'clock PM GMT+00:00",
2940:                        "EEEE, MMMM d, yyyy h:mm:ss 'o''clock' a zzz",
2941:                        "long format:    ",
2942:                        "April 4, 1997 11:00:00 PM GMT+00:00",
2943:                        "MMMM d, yyyy h:mm:ss a z", "default format: ",
2944:                        "04-Apr-97 11:00:00 PM", "dd-MMM-yy h:mm:ss a",
2945:                        "short format:   ", "4/4/97 11:00 PM", "M/d/yy h:mm a" };
2946:                int DATA_length = DATA.length;
2947:
2948:                for (int i = 0; i < DATA_length; i += 3) {
2949:                    DateFormat fmt = new SimpleDateFormat(DATA[i + 2],
2950:                            Locale.ENGLISH);
2951:                    fmt.setCalendar(greenwichcalendar);
2952:                    String result = fmt.format(greenwichdate);
2953:                    logln(DATA[i] + result);
2954:                    if (!result.equals(DATA[i + 1]))
2955:                        errln("FAIL: Expected " + DATA[i + 1] + ", got "
2956:                                + result);
2957:                }
2958:                //}
2959:                //finally {
2960:                TimeZone.setDefault(saveDefault);
2961:                //}
2962:
2963:            }
2964:
2965:            /**
2966:             * Test the formatting of dates in different locales.
2967:             */
2968:            public void TestLocaleDateFormat() {
2969:
2970:                Date testDate = new Date(874306800000l); //Mon Sep 15 00:00:00 PDT 1997
2971:                DateFormat dfFrench = DateFormat.getDateTimeInstance(
2972:                        DateFormat.FULL, DateFormat.FULL, Locale.FRENCH);
2973:                DateFormat dfUS = DateFormat.getDateTimeInstance(
2974:                        DateFormat.FULL, DateFormat.FULL, Locale.US);
2975:                //Set TimeZone = PDT
2976:                TimeZone tz = TimeZone.getTimeZone("PST");
2977:                dfFrench.setTimeZone(tz);
2978:                dfUS.setTimeZone(tz);
2979:                String expectedFRENCH_JDK12 = "lundi 15 septembre 1997 00 h 00 HAP (\u00C9UA)";
2980:                //String expectedFRENCH = "lundi 15 septembre 1997 00 h 00 PDT";
2981:                String expectedUS = "Monday, September 15, 1997 12:00:00 AM PT";
2982:                logln("Date set to : " + testDate);
2983:                String out = dfFrench.format(testDate);
2984:                logln("Date Formated with French Locale " + out);
2985:                //fix the jdk resources differences between jdk 1.2 and jdk 1.3
2986:                /* our own data only has GMT-xxxx information here
2987:                String javaVersion = System.getProperty("java.version");
2988:                if (javaVersion.startsWith("1.2")) {
2989:                    if (!out.equals(expectedFRENCH_JDK12))
2990:                        errln("FAIL: Expected " + expectedFRENCH_JDK12);
2991:                } else {
2992:                    if (!out.equals(expectedFRENCH))
2993:                        errln("FAIL: Expected " + expectedFRENCH);
2994:                }
2995:                 */
2996:                if (!out.equals(expectedFRENCH_JDK12))
2997:                    errln("FAIL: Expected " + expectedFRENCH_JDK12);
2998:                out = dfUS.format(testDate);
2999:                logln("Date Formated with US Locale " + out);
3000:                if (!out.equals(expectedUS))
3001:                    errln("FAIL: Expected " + expectedUS);
3002:            }
3003:
3004:            /**
3005:             * Test DateFormat(Calendar) API
3006:             */
3007:            public void TestDateFormatCalendar() {
3008:                DateFormat date = null, time = null, full = null;
3009:                Calendar cal = null;
3010:                ParsePosition pos = new ParsePosition(0);
3011:                String str;
3012:                Date when;
3013:
3014:                /* Create a formatter for date fields. */
3015:                date = DateFormat.getDateInstance(DateFormat.SHORT, Locale.US);
3016:                if (date == null) {
3017:                    errln("FAIL: getDateInstance failed");
3018:                    return;
3019:                }
3020:
3021:                /* Create a formatter for time fields. */
3022:                time = DateFormat.getTimeInstance(DateFormat.SHORT, Locale.US);
3023:                if (time == null) {
3024:                    errln("FAIL: getTimeInstance failed");
3025:                    return;
3026:                }
3027:
3028:                /* Create a full format for output */
3029:                full = DateFormat.getDateTimeInstance(DateFormat.FULL,
3030:                        DateFormat.FULL, Locale.US);
3031:                if (full == null) {
3032:                    errln("FAIL: getInstance failed");
3033:                    return;
3034:                }
3035:
3036:                /* Create a calendar */
3037:                cal = Calendar.getInstance(Locale.US);
3038:                if (cal == null) {
3039:                    errln("FAIL: Calendar.getInstance failed");
3040:                    return;
3041:                }
3042:
3043:                /* Parse the date */
3044:                cal.clear();
3045:                str = "4/5/2001";
3046:                pos.setIndex(0);
3047:                date.parse(str, cal, pos);
3048:                if (pos.getIndex() != str.length()) {
3049:                    errln("FAIL: DateFormat.parse(4/5/2001) failed at "
3050:                            + pos.getIndex());
3051:                    return;
3052:                }
3053:
3054:                /* Parse the time */
3055:                str = "5:45 PM";
3056:                pos.setIndex(0);
3057:                time.parse(str, cal, pos);
3058:                if (pos.getIndex() != str.length()) {
3059:                    errln("FAIL: DateFormat.parse(17:45) failed at "
3060:                            + pos.getIndex());
3061:                    return;
3062:                }
3063:
3064:                /* Check result */
3065:                when = cal.getTime();
3066:                str = full.format(when);
3067:                // Thursday, April 5, 2001 5:45:00 PM PDT 986517900000
3068:                if (when.getTime() == 986517900000.0) {
3069:                    logln("Ok: Parsed result: " + str);
3070:                } else {
3071:                    errln("FAIL: Parsed result: " + str
3072:                            + ", exp 4/5/2001 5:45 PM");
3073:                }
3074:            }
3075:
3076:            /**
3077:             * Test DateFormat's parsing of space characters.  See jitterbug 1916.
3078:             */
3079:            public void TestSpaceParsing() {
3080:
3081:                String DATA[] = {
3082:                        "yyyy MM dd",
3083:
3084:                        // pattern, input, expected output (in quotes)
3085:                        "MMMM d yy",
3086:                        " 04 05 06",
3087:                        null, // MMMM wants Apr/April
3088:                        null, "04 05 06", null, "MM d yy", " 04 05 06",
3089:                        "2006 04 05", null, "04 05 06", "2006 04 05",
3090:                        "MMMM d yy", " Apr 05 06", "2006 04 05", null,
3091:                        "Apr 05 06", "2006 04 05", };
3092:
3093:                expectParse(DATA, new Locale("en", "", ""));
3094:            }
3095:
3096:            /**
3097:             * Test handling of "HHmmss" pattern.
3098:             */
3099:            public void TestExactCountFormat() {
3100:                String DATA[] = {
3101:                        "yyyy MM dd HH:mm:ss",
3102:
3103:                        // pattern, input, expected parse or null if expect parse failure
3104:                        "HHmmss", "123456", "1970 01 01 12:34:56", null,
3105:                        "12345", "1970 01 01 01:23:45", null, "1234", null,
3106:                        null, "00-05", null, null, "12-34", null, null,
3107:                        "00+05", null, "ahhmm", "PM730", "1970 01 01 19:30:00", };
3108:
3109:                expectParse(DATA, new Locale("en", "", ""));
3110:            }
3111:
3112:            /**
3113:             * Test handling of white space.
3114:             */
3115:            public void TestWhiteSpaceParsing() {
3116:                String DATA[] = {
3117:                        "yyyy MM dd",
3118:
3119:                        // pattern, input, expected parse or null if expect parse failure
3120:
3121:                        // Pattern space run should parse input text space run
3122:                        "MM   d yy", " 04 01 03", "2003 04 01", null,
3123:                        " 04  01   03 ", "2003 04 01", };
3124:
3125:                expectParse(DATA, new Locale("en", "", ""));
3126:            }
3127:
3128:            public void TestInvalidPattern() {
3129:                Exception e = null;
3130:                SimpleDateFormat f = null;
3131:                String out = null;
3132:                try {
3133:                    f = new SimpleDateFormat("Yesterday");
3134:                    out = f.format(new Date(0));
3135:                } catch (IllegalArgumentException e1) {
3136:                    e = e1;
3137:                }
3138:                if (e != null) {
3139:                    logln("Ok: Received " + e.getMessage());
3140:                } else {
3141:                    errln("FAIL: Expected exception, got " + f.toPattern()
3142:                            + "; " + out);
3143:                }
3144:            }
3145:
3146:            public void TestGreekMay() {
3147:                Date date = new Date(-9896080848000L);
3148:                SimpleDateFormat fmt = new SimpleDateFormat(
3149:                        "EEEE, dd MMMM yyyy h:mm:ss a",
3150:                        new Locale("el", "", ""));
3151:                String str = fmt.format(date);
3152:                ParsePosition pos = new ParsePosition(0);
3153:                Date d2 = fmt.parse(str, pos);
3154:                if (!date.equals(d2)) {
3155:                    errln("FAIL: unable to parse strings where case-folding changes length");
3156:                }
3157:            }
3158:
3159:            public void testErrorChecking() {
3160:                try {
3161:                    DateFormat sdf = DateFormat.getDateTimeInstance(-1, -1,
3162:                            Locale.US);
3163:                    errln("Expected exception for getDateTimeInstance(-1, -1, Locale)");
3164:                } catch (IllegalArgumentException e) {
3165:                    logln("one ok");
3166:                } catch (Exception e) {
3167:                    warnln("Expected IllegalArgumentException, got: " + e);
3168:                }
3169:
3170:                try {
3171:                    DateFormat df = new SimpleDateFormat("aabbccc");
3172:                    df.format(new Date());
3173:                    errln("Expected exception for format with bad pattern");
3174:                } catch (IllegalArgumentException ex) {
3175:                    logln("two ok");
3176:                } catch (Exception e) {
3177:                    warnln("Expected IllegalArgumentException, got: " + e);
3178:                }
3179:
3180:                {
3181:                    SimpleDateFormat fmt = new SimpleDateFormat("dd/MM/yy"); // opposite of text
3182:                    fmt
3183:                            .set2DigitYearStart(getDate(2003,
3184:                                    Calendar.DECEMBER, 25));
3185:                    String text = "12/25/03";
3186:                    Calendar xcal = new GregorianCalendar();
3187:                    xcal.setLenient(false);
3188:                    ParsePosition pp = new ParsePosition(0);
3189:                    fmt.parse(text, xcal, pp); // should get parse error on second field, not lenient
3190:                    if (pp.getErrorIndex() == -1) {
3191:                        errln("Expected parse error");
3192:                    } else {
3193:                        logln("three ok");
3194:                    }
3195:                }
3196:            }
3197:
3198:            public void TestChineseDateFormatLocalizedPatternChars() {
3199:                // jb 4904
3200:                // make sure we can display localized versions of the chars used in the default
3201:                // chinese date format patterns
3202:                Calendar chineseCalendar = new ChineseCalendar();
3203:                chineseCalendar.setTimeInMillis((new Date()).getTime());
3204:                SimpleDateFormat longChineseDateFormat = (SimpleDateFormat) chineseCalendar
3205:                        .getDateTimeFormat(DateFormat.LONG, DateFormat.LONG,
3206:                                Locale.CHINA);
3207:                DateFormatSymbols dfs = new ChineseDateFormatSymbols(
3208:                        chineseCalendar, Locale.CHINA);
3209:                longChineseDateFormat.setDateFormatSymbols(dfs);
3210:                // This next line throws the exception
3211:                try {
3212:                    String longFormatPattern = longChineseDateFormat
3213:                            .toLocalizedPattern();
3214:                } catch (Exception e) {
3215:                    errln("could not localized pattern: " + e.getMessage());
3216:                }
3217:            }
3218:
3219:            public void TestCoverage() {
3220:                Date now = new Date();
3221:                Calendar cal = new GregorianCalendar();
3222:                DateFormat f = DateFormat.getTimeInstance();
3223:                logln("time: " + f.format(now));
3224:
3225:                int hash = f.hashCode(); // sigh, everyone overrides this
3226:
3227:                f = DateFormat.getInstance(cal);
3228:                if (hash == f.hashCode()) {
3229:                    errln("FAIL: hashCode equal for inequal objects");
3230:                }
3231:                logln("time again: " + f.format(now));
3232:
3233:                f = DateFormat.getTimeInstance(cal, DateFormat.FULL);
3234:                logln("time yet again: " + f.format(now));
3235:
3236:                f = DateFormat.getDateInstance();
3237:                logln("time yet again: " + f.format(now));
3238:
3239:                ICUResourceBundle rb = (ICUResourceBundle) UResourceBundle
3240:                        .getBundleInstance(ICUResourceBundle.ICU_BASE_NAME,
3241:                                "de_DE");
3242:                DateFormatSymbols sym = new DateFormatSymbols(rb,
3243:                        Locale.GERMANY);
3244:                DateFormatSymbols sym2 = (DateFormatSymbols) sym.clone();
3245:                if (sym.hashCode() != sym2.hashCode()) {
3246:                    errln("fail, date format symbols hashcode not equal");
3247:                }
3248:                if (!sym.equals(sym2)) {
3249:                    errln("fail, date format symbols not equal");
3250:                }
3251:
3252:                Locale foo = new Locale("fu", "FU", "BAR");
3253:                rb = null;
3254:                sym = new DateFormatSymbols(GregorianCalendar.class, foo);
3255:                sym.equals(null);
3256:
3257:                sym = new ChineseDateFormatSymbols();
3258:                sym = new ChineseDateFormatSymbols(new ChineseCalendar(), foo);
3259:                // cover new ChineseDateFormatSymbols(Calendar, ULocale)
3260:                ChineseCalendar ccal = new ChineseCalendar();
3261:                sym = new ChineseDateFormatSymbols(ccal, ULocale.CHINA); //gclsh1 add
3262:
3263:                StringBuffer buf = new StringBuffer();
3264:                FieldPosition pos = new FieldPosition(0);
3265:
3266:                f.format((Object) cal, buf, pos);
3267:                f.format((Object) now, buf, pos);
3268:                f.format((Object) new Long(now.getTime()), buf, pos);
3269:                try {
3270:                    f.format((Object) "Howdy", buf, pos);
3271:                } catch (Exception e) {
3272:                }
3273:
3274:                NumberFormat nf = f.getNumberFormat();
3275:                f.setNumberFormat(nf);
3276:
3277:                boolean lenient = f.isLenient();
3278:                f.setLenient(lenient);
3279:
3280:                ULocale uloc = f.getLocale(ULocale.ACTUAL_LOCALE);
3281:
3282:                int hashCode = f.hashCode();
3283:
3284:                boolean eq = f.equals(f);
3285:                eq = f.equals(null);
3286:                eq = f.equals(new SimpleDateFormat());
3287:
3288:                {
3289:                    ChineseDateFormat fmt = new ChineseDateFormat("yymm",
3290:                            Locale.US);
3291:                    try {
3292:                        Date d = fmt.parse("2"); // fewer symbols than required 2
3293:                        errln("whoops");
3294:                    } catch (ParseException e) {
3295:                        logln("ok");
3296:                    }
3297:
3298:                    try {
3299:                        Date d = fmt.parse("2255"); // should succeed with obeycount
3300:                        logln("ok");
3301:                    } catch (ParseException e) {
3302:                        logln("whoops");
3303:                    }
3304:
3305:                    try {
3306:                        Date d = fmt.parse("ni hao"); // not a number, should fail
3307:                        errln("whoops ni hao");
3308:                    } catch (ParseException e) {
3309:                        logln("ok ni hao");
3310:                    }
3311:                }
3312:                {
3313:                    Calendar xcal = new GregorianCalendar();
3314:                    xcal.set(Calendar.HOUR_OF_DAY, 0);
3315:                    DateFormat fmt = new SimpleDateFormat("k");
3316:                    StringBuffer xbuf = new StringBuffer();
3317:                    FieldPosition fpos = new FieldPosition(Calendar.HOUR_OF_DAY);
3318:                    fmt.format(xcal, xbuf, fpos);
3319:                    try {
3320:                        Date d = fmt.parse(xbuf.toString());
3321:                        logln("ok");
3322:
3323:                        xbuf.setLength(0);
3324:                        xcal.set(Calendar.HOUR_OF_DAY, 25);
3325:                        fmt.format(xcal, xbuf, fpos);
3326:                        Date d2 = fmt.parse(xbuf.toString());
3327:                        logln("ok again");
3328:                    } catch (ParseException e) {
3329:                        errln("whoops");
3330:                    }
3331:                }
3332:
3333:                {
3334:                    // cover gmt+hh:mm
3335:                    DateFormat fmt = new SimpleDateFormat("MM/dd/yy z");
3336:                    try {
3337:                        Date d = fmt.parse("07/10/53 GMT+10:00");
3338:                        logln("ok");
3339:                    } catch (ParseException e) {
3340:                        errln("Parse of 07/10/53 GMT+10:00 for pattern MM/dd/yy z");
3341:                    }
3342:
3343:                    // cover invalid separator after GMT
3344:                    {
3345:                        ParsePosition pp = new ParsePosition(0);
3346:                        String text = "07/10/53 GMT=10:00";
3347:                        Date d = fmt.parse(text, pp);
3348:                        if (pp.getIndex() != 12) {
3349:                            errln("Parse of 07/10/53 GMT=10:00 for pattern MM/dd/yy z");
3350:                        }
3351:                        logln("Parsing of the text stopped at pos: "
3352:                                + pp.getIndex() + " as expected and length is "
3353:                                + text.length());
3354:                    }
3355:
3356:                    // cover bad text after GMT+.
3357:                    try {
3358:                        Date d = fmt.parse("07/10/53 GMT+blecch");
3359:                        errln("whoops GMT+blecch");
3360:                    } catch (ParseException e) {
3361:                        logln("ok GMT+blecch");
3362:                    }
3363:
3364:                    // cover bad text after GMT+hh:.
3365:                    try {
3366:                        Date d = fmt.parse("07/10/53 GMT+07:blecch");
3367:                        errln("whoops GMT+xx:blecch");
3368:                    } catch (ParseException e) {
3369:                        logln("ok GMT+xx:blecch");
3370:                    }
3371:
3372:                    // cover no ':' GMT+#, # < 24 (hh)
3373:                    try {
3374:                        Date d = fmt.parse("07/10/53 GMT+07");
3375:                        logln("ok");
3376:                    } catch (ParseException e) {
3377:                        errln("Parse of 07/10/53 GMT+07 for pattern MM/dd/yy z");
3378:                    }
3379:
3380:                    // cover no ':' GMT+#, # > 24 (hhmm)
3381:                    try {
3382:                        Date d = fmt.parse("07/10/53 GMT+0730");
3383:                        logln("ok");
3384:                    } catch (ParseException e) {
3385:                        errln("Parse of 07/10/53 GMT+0730 for pattern MM/dd/yy z");
3386:                    }
3387:
3388:                    // cover no ':' GMT+#, # > 2400 (this should fail, i suspect, but doesn't)
3389:                    try {
3390:                        Date d = fmt.parse("07/10/53 GMT+07300");
3391:                        logln("should GMT+9999 fail?");
3392:                    } catch (ParseException e) {
3393:                        logln("ok, I guess");
3394:                    }
3395:
3396:                    // cover raw digits with no leading sign (bad RFC822) 
3397:                    try {
3398:                        Date d = fmt.parse("07/10/53 07");
3399:                        errln("Parse of 07/10/53 07 for pattern MM/dd/yy z passed!");
3400:                    } catch (ParseException e) {
3401:                        logln("ok");
3402:                    }
3403:
3404:                    // cover raw digits (RFC822) 
3405:                    try {
3406:                        Date d = fmt.parse("07/10/53 +07");
3407:                        logln("ok");
3408:                    } catch (ParseException e) {
3409:                        errln("Parse of 07/10/53 +07 for pattern MM/dd/yy z failed");
3410:                    }
3411:
3412:                    // cover raw digits (RFC822) 
3413:                    try {
3414:                        Date d = fmt.parse("07/10/53 -0730");
3415:                        logln("ok");
3416:                    } catch (ParseException e) {
3417:                        errln("Parse of 07/10/53 -00730 for pattern MM/dd/yy z failed");
3418:                    }
3419:
3420:                    // cover raw digits (RFC822) in DST
3421:                    try {
3422:                        fmt.setTimeZone(TimeZone.getTimeZone("PDT"));
3423:                        Date d = fmt.parse("07/10/53 -0730");
3424:                        logln("ok");
3425:                    } catch (ParseException e) {
3426:                        errln("Parse of 07/10/53 -0730 for pattern MM/dd/yy z failed");
3427:                    }
3428:                }
3429:
3430:                // TODO: revisit toLocalizedPattern
3431:                if (false) {
3432:                    SimpleDateFormat fmt = new SimpleDateFormat("aabbcc");
3433:                    try {
3434:                        String pat = fmt.toLocalizedPattern();
3435:                        errln("whoops, shouldn't have been able to localize aabbcc");
3436:                    } catch (IllegalArgumentException e) {
3437:                        logln("aabbcc localize ok");
3438:                    }
3439:                }
3440:
3441:                {
3442:                    SimpleDateFormat fmt = new SimpleDateFormat("'aabbcc");
3443:                    try {
3444:                        String pat = fmt.toLocalizedPattern();
3445:                        errln("whoops, localize unclosed quote");
3446:                    } catch (IllegalArgumentException e) {
3447:                        logln("localize unclosed quote ok");
3448:                    }
3449:                }
3450:                {
3451:                    SimpleDateFormat fmt = new SimpleDateFormat("MM/dd/yy z");
3452:                    String text = "08/15/58 DBDY"; // bogus time zone
3453:                    try {
3454:                        fmt.parse(text);
3455:                        errln("recognized bogus time zone DBDY");
3456:                    } catch (ParseException e) {
3457:                        logln("time zone ex ok");
3458:                    }
3459:                }
3460:
3461:                {
3462:                    // force fallback to default timezone when fmt timezone 
3463:                    // is not named
3464:                    SimpleDateFormat fmt = new SimpleDateFormat("MM/dd/yy z");
3465:                    // force fallback to default time zone, still fails
3466:                    fmt.setTimeZone(TimeZone.getTimeZone("GMT+0147")); // not in equivalency group
3467:                    String text = "08/15/58 DBDY";
3468:                    try {
3469:                        fmt.parse(text);
3470:                        errln("Parse of 07/10/53 DBDY for pattern MM/dd/yy z passed");
3471:                    } catch (ParseException e) {
3472:                        logln("time zone ex2 ok");
3473:                    }
3474:
3475:                    // force success on fallback
3476:                    text = "08/15/58 " + TimeZone.getDefault().getID();
3477:                    try {
3478:                        fmt.parse(text);
3479:                        logln("found default tz");
3480:                    } catch (ParseException e) {
3481:                        errln("whoops, got parse exception");
3482:                    }
3483:                }
3484:
3485:                {
3486:                    // force fallback to symbols list of timezones when neither 
3487:                    // fmt and default timezone is named
3488:                    SimpleDateFormat fmt = new SimpleDateFormat("MM/dd/yy z");
3489:                    TimeZone oldtz = TimeZone.getDefault();
3490:                    TimeZone newtz = TimeZone.getTimeZone("GMT+0137"); // nonstandard tz
3491:                    fmt.setTimeZone(newtz);
3492:                    TimeZone.setDefault(newtz); // todo: fix security issue
3493:
3494:                    // fallback to symbol list, but fail
3495:                    String text = "08/15/58 DBDY"; // try to parse the bogus time zone
3496:                    try {
3497:                        fmt.parse(text);
3498:                        errln("Parse of 07/10/53 DBDY for pattern MM/dd/yy z passed");
3499:                    } catch (ParseException e) {
3500:                        logln("time zone ex3 ok");
3501:                    } catch (Exception e) {
3502:                        // hmmm... this shouldn't happen.  don't want to exit this
3503:                        // fn with timezone improperly set, so just in case
3504:                        TimeZone.setDefault(oldtz);
3505:                        throw new IllegalStateException(e.getMessage());
3506:                    }
3507:
3508:                    // create DFS that recognizes our bogus time zone, sortof
3509:                    DateFormatSymbols xsym = new DateFormatSymbols();
3510:                    String[][] tzids = xsym.getZoneStrings();
3511:                    if (tzids.length > 0) { // let's hope!
3512:                        tzids[0][1] = "DBDY"; // change a local name
3513:                        logln("replaced '" + tzids[0][0] + "' with DBDY");
3514:
3515:                        xsym.setZoneStrings(tzids);
3516:                        fmt.setDateFormatSymbols(xsym);
3517:
3518:                        try {
3519:                            fmt.parse(text);
3520:                            logln("we parsed DBDY (as GMT, but still...)");
3521:                        } catch (ParseException e) {
3522:                            errln("hey, still didn't recognize DBDY");
3523:                        } finally {
3524:                            TimeZone.setDefault(oldtz);
3525:                        }
3526:                    }
3527:                }
3528:
3529:                {
3530:                    //cover getAvailableULocales
3531:                    final ULocale[] locales = DateFormat.getAvailableULocales();
3532:                    long count = locales.length;
3533:                    if (count == 0) {
3534:                        errln(" got a empty list for getAvailableULocales");
3535:                    } else {
3536:                        logln("" + count + " available ulocales");
3537:                    }
3538:                }
3539:
3540:                {
3541:                    //cover DateFormatSymbols.getDateFormatBundle
3542:                    cal = new GregorianCalendar();
3543:                    Locale loc = Locale.getDefault();
3544:                    DateFormatSymbols mysym = new DateFormatSymbols(cal, loc);
3545:                    if (mysym == null)
3546:                        errln("FAIL: constructs DateFormatSymbols with calendar and locale failed");
3547:
3548:                    uloc = ULocale.getDefault();
3549:                    ResourceBundle resb = DateFormatSymbols
3550:                            .getDateFormatBundle(cal, loc);
3551:                    ResourceBundle resb2 = DateFormatSymbols
3552:                            .getDateFormatBundle(cal, uloc);
3553:                    ResourceBundle resb3 = DateFormatSymbols
3554:                            .getDateFormatBundle(cal.getClass(), loc);
3555:                    ResourceBundle resb4 = DateFormatSymbols
3556:                            .getDateFormatBundle(cal.getClass(), uloc);
3557:
3558:                    /* (ToDo) Not sure how to construct resourceBundle for this test
3559:                        So comment out the verifying code. 
3560:                    if (!resb.equals(resb2) || 
3561:                        !resb.equals(resb3) ||
3562:                        !resb.equals(resb4) )
3563:                        errln("FAIL: getDateFormatBundle failed!");            
3564:                     */
3565:                }
3566:            }
3567:
3568:            public void TestStandAloneMonths() {
3569:                String EN_DATA[] = { "yyyy MM dd HH:mm:ss",
3570:
3571:                "yyyy LLLL dd H:mm:ss", "fp", "2004 03 10 16:36:31",
3572:                        "2004 March 10 16:36:31", "2004 03 10 16:36:31",
3573:                        "yyyy LLL dd H:mm:ss", "fp", "2004 03 10 16:36:31",
3574:                        "2004 Mar 10 16:36:31", "2004 03 10 16:36:31",
3575:                        "yyyy LLLL dd H:mm:ss", "F", "2004 03 10 16:36:31",
3576:                        "2004 March 10 16:36:31", "yyyy LLL dd H:mm:ss", "pf",
3577:                        "2004 Mar 10 16:36:31", "2004 03 10 16:36:31",
3578:                        "2004 Mar 10 16:36:31",
3579:
3580:                        "LLLL", "fp", "1970 01 01 0:00:00", "January",
3581:                        "1970 01 01 0:00:00", "LLLL", "fp",
3582:                        "1970 02 01 0:00:00", "February", "1970 02 01 0:00:00",
3583:                        "LLLL", "fp", "1970 03 01 0:00:00", "March",
3584:                        "1970 03 01 0:00:00", "LLLL", "fp",
3585:                        "1970 04 01 0:00:00", "April", "1970 04 01 0:00:00",
3586:                        "LLLL", "fp", "1970 05 01 0:00:00", "May",
3587:                        "1970 05 01 0:00:00", "LLLL", "fp",
3588:                        "1970 06 01 0:00:00", "June", "1970 06 01 0:00:00",
3589:                        "LLLL", "fp", "1970 07 01 0:00:00", "July",
3590:                        "1970 07 01 0:00:00", "LLLL", "fp",
3591:                        "1970 08 01 0:00:00", "August", "1970 08 01 0:00:00",
3592:                        "LLLL", "fp", "1970 09 01 0:00:00", "September",
3593:                        "1970 09 01 0:00:00", "LLLL", "fp",
3594:                        "1970 10 01 0:00:00", "October", "1970 10 01 0:00:00",
3595:                        "LLLL", "fp", "1970 11 01 0:00:00", "November",
3596:                        "1970 11 01 0:00:00", "LLLL", "fp",
3597:                        "1970 12 01 0:00:00", "December", "1970 12 01 0:00:00",
3598:
3599:                        "LLL", "fp", "1970 01 01 0:00:00", "Jan",
3600:                        "1970 01 01 0:00:00", "LLL", "fp",
3601:                        "1970 02 01 0:00:00", "Feb", "1970 02 01 0:00:00",
3602:                        "LLL", "fp", "1970 03 01 0:00:00", "Mar",
3603:                        "1970 03 01 0:00:00", "LLL", "fp",
3604:                        "1970 04 01 0:00:00", "Apr", "1970 04 01 0:00:00",
3605:                        "LLL", "fp", "1970 05 01 0:00:00", "May",
3606:                        "1970 05 01 0:00:00", "LLL", "fp",
3607:                        "1970 06 01 0:00:00", "Jun", "1970 06 01 0:00:00",
3608:                        "LLL", "fp", "1970 07 01 0:00:00", "Jul",
3609:                        "1970 07 01 0:00:00", "LLL", "fp",
3610:                        "1970 08 01 0:00:00", "Aug", "1970 08 01 0:00:00",
3611:                        "LLL", "fp", "1970 09 01 0:00:00", "Sep",
3612:                        "1970 09 01 0:00:00", "LLL", "fp",
3613:                        "1970 10 01 0:00:00", "Oct", "1970 10 01 0:00:00",
3614:                        "LLL", "fp", "1970 11 01 0:00:00", "Nov",
3615:                        "1970 11 01 0:00:00", "LLL", "fp",
3616:                        "1970 12 01 0:00:00", "Dec", "1970 12 01 0:00:00", };
3617:
3618:                String CS_DATA[] = { "yyyy MM dd HH:mm:ss",
3619:
3620:                "yyyy LLLL dd H:mm:ss", "fp", "2004 04 10 16:36:31",
3621:                        "2004 duben 10 16:36:31", "2004 04 10 16:36:31",
3622:                        "yyyy MMMM dd H:mm:ss", "fp", "2004 04 10 16:36:31",
3623:                        "2004 dubna 10 16:36:31", "2004 04 10 16:36:31",
3624:                        "yyyy LLL dd H:mm:ss", "fp", "2004 04 10 16:36:31",
3625:                        "2004 4. 10 16:36:31", "2004 04 10 16:36:31",
3626:                        "yyyy LLLL dd H:mm:ss", "F", "2004 04 10 16:36:31",
3627:                        "2004 duben 10 16:36:31", "yyyy MMMM dd H:mm:ss", "F",
3628:                        "2004 04 10 16:36:31", "2004 dubna 10 16:36:31",
3629:                        "yyyy LLLL dd H:mm:ss", "pf", "2004 duben 10 16:36:31",
3630:                        "2004 04 10 16:36:31", "2004 duben 10 16:36:31",
3631:                        "yyyy MMMM dd H:mm:ss", "pf", "2004 dubna 10 16:36:31",
3632:                        "2004 04 10 16:36:31", "2004 dubna 10 16:36:31",
3633:
3634:                        "LLLL", "fp", "1970 01 01 0:00:00", "leden",
3635:                        "1970 01 01 0:00:00", "LLLL", "fp",
3636:                        "1970 02 01 0:00:00", "\u00FAnor",
3637:                        "1970 02 01 0:00:00", "LLLL", "fp",
3638:                        "1970 03 01 0:00:00", "b\u0159ezen",
3639:                        "1970 03 01 0:00:00", "LLLL", "fp",
3640:                        "1970 04 01 0:00:00", "duben", "1970 04 01 0:00:00",
3641:                        "LLLL", "fp", "1970 05 01 0:00:00", "kv\u011Bten",
3642:                        "1970 05 01 0:00:00", "LLLL", "fp",
3643:                        "1970 06 01 0:00:00", "\u010Derven",
3644:                        "1970 06 01 0:00:00", "LLLL", "fp",
3645:                        "1970 07 01 0:00:00", "\u010Dervenec",
3646:                        "1970 07 01 0:00:00", "LLLL", "fp",
3647:                        "1970 08 01 0:00:00", "srpen", "1970 08 01 0:00:00",
3648:                        "LLLL", "fp", "1970 09 01 0:00:00",
3649:                        "z\u00E1\u0159\u00ED", "1970 09 01 0:00:00", "LLLL",
3650:                        "fp", "1970 10 01 0:00:00", "\u0159\u00EDjen",
3651:                        "1970 10 01 0:00:00", "LLLL", "fp",
3652:                        "1970 11 01 0:00:00", "listopad", "1970 11 01 0:00:00",
3653:                        "LLLL", "fp", "1970 12 01 0:00:00", "prosinec",
3654:                        "1970 12 01 0:00:00",
3655:
3656:                        "LLL", "fp", "1970 01 01 0:00:00", "1.",
3657:                        "1970 01 01 0:00:00", "LLL", "fp",
3658:                        "1970 02 01 0:00:00", "2.", "1970 02 01 0:00:00",
3659:                        "LLL", "fp", "1970 03 01 0:00:00", "3.",
3660:                        "1970 03 01 0:00:00", "LLL", "fp",
3661:                        "1970 04 01 0:00:00", "4.", "1970 04 01 0:00:00",
3662:                        "LLL", "fp", "1970 05 01 0:00:00", "5.",
3663:                        "1970 05 01 0:00:00", "LLL", "fp",
3664:                        "1970 06 01 0:00:00", "6.", "1970 06 01 0:00:00",
3665:                        "LLL", "fp", "1970 07 01 0:00:00", "7.",
3666:                        "1970 07 01 0:00:00", "LLL", "fp",
3667:                        "1970 08 01 0:00:00", "8.", "1970 08 01 0:00:00",
3668:                        "LLL", "fp", "1970 09 01 0:00:00", "9.",
3669:                        "1970 09 01 0:00:00", "LLL", "fp",
3670:                        "1970 10 01 0:00:00", "10.", "1970 10 01 0:00:00",
3671:                        "LLL", "fp", "1970 11 01 0:00:00", "11.",
3672:                        "1970 11 01 0:00:00", "LLL", "fp",
3673:                        "1970 12 01 0:00:00", "12.", "1970 12 01 0:00:00", };
3674:
3675:                expect(EN_DATA, new Locale("en", "", ""));
3676:                expect(CS_DATA, new Locale("cs", "", ""));
3677:            }
3678:
3679:            public void TestStandAloneDays() {
3680:                String EN_DATA[] = { "yyyy MM dd HH:mm:ss",
3681:
3682:                "cccc", "fp", "1970 01 04 0:00:00", "Sunday",
3683:                        "1970 01 04 0:00:00", "cccc", "fp",
3684:                        "1970 01 05 0:00:00", "Monday", "1970 01 05 0:00:00",
3685:                        "cccc", "fp", "1970 01 06 0:00:00", "Tuesday",
3686:                        "1970 01 06 0:00:00", "cccc", "fp",
3687:                        "1970 01 07 0:00:00", "Wednesday",
3688:                        "1970 01 07 0:00:00", "cccc", "fp",
3689:                        "1970 01 01 0:00:00", "Thursday", "1970 01 01 0:00:00",
3690:                        "cccc", "fp", "1970 01 02 0:00:00", "Friday",
3691:                        "1970 01 02 0:00:00", "cccc", "fp",
3692:                        "1970 01 03 0:00:00", "Saturday", "1970 01 03 0:00:00",
3693:
3694:                        "ccc", "fp", "1970 01 04 0:00:00", "Sun",
3695:                        "1970 01 04 0:00:00", "ccc", "fp",
3696:                        "1970 01 05 0:00:00", "Mon", "1970 01 05 0:00:00",
3697:                        "ccc", "fp", "1970 01 06 0:00:00", "Tue",
3698:                        "1970 01 06 0:00:00", "ccc", "fp",
3699:                        "1970 01 07 0:00:00", "Wed", "1970 01 07 0:00:00",
3700:                        "ccc", "fp", "1970 01 01 0:00:00", "Thu",
3701:                        "1970 01 01 0:00:00", "ccc", "fp",
3702:                        "1970 01 02 0:00:00", "Fri", "1970 01 02 0:00:00",
3703:                        "ccc", "fp", "1970 01 03 0:00:00", "Sat",
3704:                        "1970 01 03 0:00:00", };
3705:
3706:                String CS_DATA[] = { "yyyy MM dd HH:mm:ss",
3707:
3708:                "cccc", "fp", "1970 01 04 0:00:00", "ned\u011Ble",
3709:                        "1970 01 04 0:00:00", "cccc", "fp",
3710:                        "1970 01 05 0:00:00", "pond\u011Bl\u00ED",
3711:                        "1970 01 05 0:00:00", "cccc", "fp",
3712:                        "1970 01 06 0:00:00", "\u00FAter\u00FD",
3713:                        "1970 01 06 0:00:00", "cccc", "fp",
3714:                        "1970 01 07 0:00:00", "st\u0159eda",
3715:                        "1970 01 07 0:00:00", "cccc", "fp",
3716:                        "1970 01 01 0:00:00", "\u010Dtvrtek",
3717:                        "1970 01 01 0:00:00", "cccc", "fp",
3718:                        "1970 01 02 0:00:00", "p\u00E1tek",
3719:                        "1970 01 02 0:00:00", "cccc", "fp",
3720:                        "1970 01 03 0:00:00", "sobota", "1970 01 03 0:00:00",
3721:
3722:                        "ccc", "fp", "1970 01 04 0:00:00", "ne",
3723:                        "1970 01 04 0:00:00", "ccc", "fp",
3724:                        "1970 01 05 0:00:00", "po", "1970 01 05 0:00:00",
3725:                        "ccc", "fp", "1970 01 06 0:00:00", "\u00FAt",
3726:                        "1970 01 06 0:00:00", "ccc", "fp",
3727:                        "1970 01 07 0:00:00", "st", "1970 01 07 0:00:00",
3728:                        "ccc", "fp", "1970 01 01 0:00:00", "\u010Dt",
3729:                        "1970 01 01 0:00:00", "ccc", "fp",
3730:                        "1970 01 02 0:00:00", "p\u00E1", "1970 01 02 0:00:00",
3731:                        "ccc", "fp", "1970 01 03 0:00:00", "so",
3732:                        "1970 01 03 0:00:00", };
3733:
3734:                expect(EN_DATA, new Locale("en", "", ""));
3735:                expect(CS_DATA, new Locale("cs", "", ""));
3736:            }
3737:
3738:            public void TestNarrowNames() {
3739:                String EN_DATA[] = { "yyyy MM dd HH:mm:ss",
3740:
3741:                "yyyy MMMMM dd H:mm:ss", "2004 03 10 16:36:31",
3742:                        "2004 M 10 16:36:31", "yyyy LLLLL dd H:mm:ss",
3743:                        "2004 03 10 16:36:31", "2004 M 10 16:36:31",
3744:
3745:                        "MMMMM", "1970 01 01 0:00:00", "J", "MMMMM",
3746:                        "1970 02 01 0:00:00", "F", "MMMMM",
3747:                        "1970 03 01 0:00:00", "M", "MMMMM",
3748:                        "1970 04 01 0:00:00", "A", "MMMMM",
3749:                        "1970 05 01 0:00:00", "M", "MMMMM",
3750:                        "1970 06 01 0:00:00", "J", "MMMMM",
3751:                        "1970 07 01 0:00:00", "J", "MMMMM",
3752:                        "1970 08 01 0:00:00", "A", "MMMMM",
3753:                        "1970 09 01 0:00:00", "S", "MMMMM",
3754:                        "1970 10 01 0:00:00", "O", "MMMMM",
3755:                        "1970 11 01 0:00:00", "N", "MMMMM",
3756:                        "1970 12 01 0:00:00", "D",
3757:
3758:                        "LLLLL", "1970 01 01 0:00:00", "J", "LLLLL",
3759:                        "1970 02 01 0:00:00", "F", "LLLLL",
3760:                        "1970 03 01 0:00:00", "M", "LLLLL",
3761:                        "1970 04 01 0:00:00", "A", "LLLLL",
3762:                        "1970 05 01 0:00:00", "M", "LLLLL",
3763:                        "1970 06 01 0:00:00", "J", "LLLLL",
3764:                        "1970 07 01 0:00:00", "J", "LLLLL",
3765:                        "1970 08 01 0:00:00", "A", "LLLLL",
3766:                        "1970 09 01 0:00:00", "S", "LLLLL",
3767:                        "1970 10 01 0:00:00", "O", "LLLLL",
3768:                        "1970 11 01 0:00:00", "N", "LLLLL",
3769:                        "1970 12 01 0:00:00", "D",
3770:
3771:                        "EEEEE", "1970 01 04 0:00:00", "S", "EEEEE",
3772:                        "1970 01 05 0:00:00", "M", "EEEEE",
3773:                        "1970 01 06 0:00:00", "T", "EEEEE",
3774:                        "1970 01 07 0:00:00", "W", "EEEEE",
3775:                        "1970 01 01 0:00:00", "T", "EEEEE",
3776:                        "1970 01 02 0:00:00", "F", "EEEEE",
3777:                        "1970 01 03 0:00:00", "S",
3778:
3779:                        "ccccc", "1970 01 04 0:00:00", "S", "ccccc",
3780:                        "1970 01 05 0:00:00", "M", "ccccc",
3781:                        "1970 01 06 0:00:00", "T", "ccccc",
3782:                        "1970 01 07 0:00:00", "W", "ccccc",
3783:                        "1970 01 01 0:00:00", "T", "ccccc",
3784:                        "1970 01 02 0:00:00", "F", "ccccc",
3785:                        "1970 01 03 0:00:00", "S", };
3786:
3787:                String CS_DATA[] = { "yyyy MM dd HH:mm:ss",
3788:
3789:                "yyyy LLLLL dd H:mm:ss", "2004 04 10 16:36:31",
3790:                        "2004 d 10 16:36:31", "yyyy MMMMM dd H:mm:ss",
3791:                        "2004 04 10 16:36:31", "2004 d 10 16:36:31",
3792:
3793:                        "MMMMM", "1970 01 01 0:00:00", "l", "MMMMM",
3794:                        "1970 02 01 0:00:00", "\u00FA", "MMMMM",
3795:                        "1970 03 01 0:00:00", "b", "MMMMM",
3796:                        "1970 04 01 0:00:00", "d", "MMMMM",
3797:                        "1970 05 01 0:00:00", "k", "MMMMM",
3798:                        "1970 06 01 0:00:00", "\u010D", "MMMMM",
3799:                        "1970 07 01 0:00:00", "\u010D", "MMMMM",
3800:                        "1970 08 01 0:00:00", "s", "MMMMM",
3801:                        "1970 09 01 0:00:00", "z", "MMMMM",
3802:                        "1970 10 01 0:00:00", "\u0159", "MMMMM",
3803:                        "1970 11 01 0:00:00", "l", "MMMMM",
3804:                        "1970 12 01 0:00:00", "p",
3805:
3806:                        "LLLLL", "1970 01 01 0:00:00", "l", "LLLLL",
3807:                        "1970 02 01 0:00:00", "\u00FA", "LLLLL",
3808:                        "1970 03 01 0:00:00", "b", "LLLLL",
3809:                        "1970 04 01 0:00:00", "d", "LLLLL",
3810:                        "1970 05 01 0:00:00", "k", "LLLLL",
3811:                        "1970 06 01 0:00:00", "\u010D", "LLLLL",
3812:                        "1970 07 01 0:00:00", "\u010D", "LLLLL",
3813:                        "1970 08 01 0:00:00", "s", "LLLLL",
3814:                        "1970 09 01 0:00:00", "z", "LLLLL",
3815:                        "1970 10 01 0:00:00", "\u0159", "LLLLL",
3816:                        "1970 11 01 0:00:00", "l", "LLLLL",
3817:                        "1970 12 01 0:00:00", "p",
3818:
3819:                        "EEEEE", "1970 01 04 0:00:00", "N", "EEEEE",
3820:                        "1970 01 05 0:00:00", "P", "EEEEE",
3821:                        "1970 01 06 0:00:00", "\u00DA", "EEEEE",
3822:                        "1970 01 07 0:00:00", "S", "EEEEE",
3823:                        "1970 01 01 0:00:00", "\u010C", "EEEEE",
3824:                        "1970 01 02 0:00:00", "P", "EEEEE",
3825:                        "1970 01 03 0:00:00", "S",
3826:
3827:                        "ccccc", "1970 01 04 0:00:00", "N", "ccccc",
3828:                        "1970 01 05 0:00:00", "P", "ccccc",
3829:                        "1970 01 06 0:00:00", "\u00DA", "ccccc",
3830:                        "1970 01 07 0:00:00", "S", "ccccc",
3831:                        "1970 01 01 0:00:00", "\u010C", "ccccc",
3832:                        "1970 01 02 0:00:00", "P", "ccccc",
3833:                        "1970 01 03 0:00:00", "S", };
3834:
3835:                expectFormat(EN_DATA, new Locale("en", "", ""));
3836:                expectFormat(CS_DATA, new Locale("cs", "", ""));
3837:            }
3838:
3839:            public void TestEras() {
3840:                String EN_DATA[] = { "yyyy MM dd",
3841:
3842:                "MMMM dd yyyy G", "fp", "1951 07 17", "July 17 1951 AD",
3843:                        "1951 07 17", "MMMM dd yyyy GG", "fp", "1951 07 17",
3844:                        "July 17 1951 AD", "1951 07 17", "MMMM dd yyyy GGG",
3845:                        "fp", "1951 07 17", "July 17 1951 AD", "1951 07 17",
3846:                        "MMMM dd yyyy GGGG", "fp", "1951 07 17",
3847:                        "July 17 1951 Anno Domini", "1951 07 17",
3848:
3849:                        "MMMM dd yyyy G", "fp", "-438 07 17",
3850:                        "July 17 0439 BC", "-438 07 17", "MMMM dd yyyy GG",
3851:                        "fp", "-438 07 17", "July 17 0439 BC", "-438 07 17",
3852:                        "MMMM dd yyyy GGG", "fp", "-438 07 17",
3853:                        "July 17 0439 BC", "-438 07 17", "MMMM dd yyyy GGGG",
3854:                        "fp", "-438 07 17", "July 17 0439 Before Christ",
3855:                        "-438 07 17", };
3856:
3857:                expect(EN_DATA, new Locale("en", "", ""));
3858:            }
3859:
3860:            /*    
3861:             public void TestQuarters()
3862:             {
3863:             String EN_DATA[] = {
3864:             "yyyy MM dd",
3865:
3866:             "Q",    "fp", "1970 01 01", "1",           "1970 01 01",
3867:             "QQ",   "fp", "1970 04 01", "02",          "1970 04 01",
3868:             "QQQ",  "fp", "1970 07 01", "Q3",          "1970 07 01",
3869:             "QQQQ", "fp", "1970 10 01", "4th quarter", "1970 10 01",
3870:
3871:             "q",    "fp", "1970 01 01", "1",           "1970 01 01",
3872:             "qq",   "fp", "1970 04 01", "02",          "1970 04 01",
3873:             "qqq",  "fp", "1970 07 01", "Q3",          "1970 07 01",
3874:             "qqqq", "fp", "1970 10 01", "4th quarter", "1970 10 01",
3875:             };
3876:            
3877:             expect(EN_DATA, new Locale("en", "", ""));
3878:             }
3879:             */
3880:            /**
3881:             * Test parsing.  Input is an array that starts with the following
3882:             * header:
3883:             *
3884:             * [0]   = pattern string to parse [i+2] with
3885:             *
3886:             * followed by test cases, each of which is 3 array elements:
3887:             *
3888:             * [i]   = pattern, or null to reuse prior pattern
3889:             * [i+1] = input string
3890:             * [i+2] = expected parse result (parsed with pattern [0])
3891:             *
3892:             * If expect parse failure, then [i+2] should be null.
3893:             */
3894:            void expectParse(String[] data, Locale loc) {
3895:                Date FAIL = null;
3896:                String FAIL_STR = "parse failure";
3897:                int i = 0;
3898:
3899:                SimpleDateFormat fmt = new SimpleDateFormat("", loc);
3900:                SimpleDateFormat ref = new SimpleDateFormat(data[i++], loc);
3901:                SimpleDateFormat gotfmt = new SimpleDateFormat(
3902:                        "G yyyy MM dd HH:mm:ss z", loc);
3903:
3904:                String currentPat = null;
3905:                while (i < data.length) {
3906:                    String pattern = data[i++];
3907:                    String input = data[i++];
3908:                    String expected = data[i++];
3909:
3910:                    if (pattern != null) {
3911:                        fmt.applyPattern(pattern);
3912:                        currentPat = pattern;
3913:                    }
3914:                    String gotstr = FAIL_STR;
3915:                    Date got;
3916:                    try {
3917:                        got = fmt.parse(input);
3918:                        gotstr = gotfmt.format(got);
3919:                    } catch (ParseException e1) {
3920:                        got = FAIL;
3921:                    }
3922:
3923:                    Date exp = FAIL;
3924:                    String expstr = FAIL_STR;
3925:                    if (expected != null) {
3926:                        expstr = expected;
3927:                        try {
3928:                            exp = ref.parse(expstr);
3929:                        } catch (ParseException e2) {
3930:                            errln("FAIL: Internal test error");
3931:                        }
3932:                    }
3933:
3934:                    if (got == exp || (got != null && got.equals(exp))) {
3935:                        logln("Ok: " + input + " x " + currentPat + " => "
3936:                                + gotstr);
3937:                    } else {
3938:                        errln("FAIL: " + input + " x " + currentPat + " => "
3939:                                + gotstr + ", expected " + expstr);
3940:                    }
3941:                }
3942:            }
3943:
3944:            /**
3945:             * Test formatting.  Input is an array of String that starts
3946:             * with a single 'header' element
3947:             *
3948:             * [0]   = reference dateformat pattern string (ref)
3949:             *
3950:             * followed by test cases, each of which is 4 or 5 elements:
3951:             *
3952:             * [i]   = test dateformat pattern string (test), or null to reuse prior test pattern
3953:             * [i+1] = data string A
3954:             * [i+2] = data string B
3955:             *
3956:             * Formats a date, checks the result.
3957:             *
3958:             * Examples:
3959:             * "y/M/d H:mm:ss.SSS", "2004 03 10 16:36:31.567", "2004/3/10 16:36:31.567"
3960:             * -- ref.parse A, get t0
3961:             * -- test.format t0, get r0
3962:             * -- compare r0 to B, fail if not equal
3963:             */
3964:            void expectFormat(String[] data, Locale loc) {
3965:                int i = 1;
3966:                SimpleDateFormat univ = new SimpleDateFormat(
3967:                        "EE G yyyy MM dd HH:mm:ss.SSS zzz", loc);
3968:                String currentPat = null;
3969:                SimpleDateFormat ref = new SimpleDateFormat(data[0], loc);
3970:
3971:                while (i < data.length) {
3972:                    SimpleDateFormat fmt = new SimpleDateFormat("", loc);
3973:                    String pattern = data[i++];
3974:                    if (pattern != null) {
3975:                        fmt.applyPattern(pattern);
3976:                        currentPat = pattern;
3977:                    }
3978:
3979:                    String datestr = data[i++];
3980:                    String string = data[i++];
3981:                    Date date = null;
3982:
3983:                    try {
3984:                        date = ref.parse(datestr);
3985:                    } catch (ParseException e) {
3986:                        errln("FAIL: Internal test error; can't parse "
3987:                                + datestr);
3988:                        continue;
3989:                    }
3990:
3991:                    assertEquals("\"" + currentPat + "\".format(" + datestr
3992:                            + ")", string, fmt.format(date));
3993:                }
3994:            }
3995:
3996:            /**
3997:             * Test formatting and parsing.  Input is an array of String that starts
3998:             * with a single 'header' element
3999:             *
4000:             * [0]   = reference dateformat pattern string (ref)
4001:             *
4002:             * followed by test cases, each of which is 4 or 5 elements:
4003:             *
4004:             * [i]   = test dateformat pattern string (test), or null to reuse prior test pattern
4005:             * [i+1] = control string, either "fp", "pf", or "F".
4006:             * [i+2] = data string A
4007:             * [i+3] = data string B
4008:             * [i+4] = data string C (not present for 'F' control string)
4009:             *
4010:             * Note: the number of data strings depends on the control string.
4011:             *
4012:             * fp formats a date, checks the result, then parses the result and checks against a (possibly different) date
4013:             * pf parses a string, checks the result, then formats the result and checks against a (possibly different) string
4014:             * F is a shorthand for fp when the second date is the same as the first
4015:             * P is a shorthand for pf when the second string is the same as the first
4016:             *
4017:             * Examples:
4018:             * (fp) "y/M/d H:mm:ss.SS", "fp", "2004 03 10 16:36:31.567", "2004/3/10 16:36:31.56", "2004 03 10 16:36:31.560",
4019:             * -- ref.parse A, get t0
4020:             * -- test.format t0, get r0
4021:             * -- compare r0 to B, fail if not equal
4022:             * -- test.parse B, get t1
4023:             * -- ref.parse C, get t2
4024:             * -- compare t1 and t2, fail if not equal
4025:             *
4026:             * (F) "y/M/d H:mm:ss.SSS", "F", "2004 03 10 16:36:31.567", "2004/3/10 16:36:31.567"
4027:             * -- ref.parse A, get t0
4028:             * -- test.format t0, get r0
4029:             * -- compare r0 to B, fail if not equal
4030:             * -- test.parse B, get t1
4031:             * -- compare t1 and t0, fail if not equal
4032:             *
4033:             * (pf) "y/M/d H:mm:ss.SSSS", "pf", "2004/3/10 16:36:31.5679", "2004 03 10 16:36:31.567", "2004/3/10 16:36:31.5670",
4034:             * -- test.parse A, get t0
4035:             * -- ref.parse B, get t1
4036:             * -- compare t0 to t1, fail if not equal
4037:             * -- test.format t1, get r0
4038:             * -- compare r0 and C, fail if not equal
4039:             *
4040:             * (P) "y/M/d H:mm:ss.SSSS", "P", "2004/3/10 16:36:31.5679", "2004 03 10 16:36:31.567"",
4041:             * -- test.parse A, get t0
4042:             * -- ref.parse B, get t1
4043:             * -- compare t0 to t1, fail if not equal
4044:             * -- test.format t1, get r0
4045:             * -- compare r0 and A, fail if not equal
4046:             */
4047:            void expect(String[] data, Locale loc) {
4048:                int i = 1;
4049:                SimpleDateFormat univ = new SimpleDateFormat(
4050:                        "EE G yyyy MM dd HH:mm:ss.SSS zzz", loc);
4051:                String currentPat = null;
4052:                SimpleDateFormat ref = new SimpleDateFormat(data[0], loc);
4053:
4054:                while (i < data.length) {
4055:                    SimpleDateFormat fmt = new SimpleDateFormat("", loc);
4056:                    String pattern = data[i++];
4057:                    if (pattern != null) {
4058:                        fmt.applyPattern(pattern);
4059:                        currentPat = pattern;
4060:                    }
4061:
4062:                    String control = data[i++];
4063:
4064:                    if (control.equals("fp") || control.equals("F")) {
4065:                        // 'f'
4066:                        String datestr = data[i++];
4067:                        String string = data[i++];
4068:                        String datestr2 = datestr;
4069:                        if (control.length() == 2) {
4070:                            datestr2 = data[i++];
4071:                        }
4072:                        Date date = null;
4073:                        try {
4074:                            date = ref.parse(datestr);
4075:                        } catch (ParseException e) {
4076:                            errln("FAIL: Internal test error; can't parse "
4077:                                    + datestr);
4078:                            continue;
4079:                        }
4080:                        assertEquals("\"" + currentPat + "\".format(" + datestr
4081:                                + ")", string, fmt.format(date));
4082:                        // 'p'
4083:                        if (!datestr2.equals(datestr)) {
4084:                            try {
4085:                                date = ref.parse(datestr2);
4086:                            } catch (ParseException e2) {
4087:                                errln("FAIL: Internal test error; can't parse "
4088:                                        + datestr2);
4089:                                continue;
4090:                            }
4091:                        }
4092:                        try {
4093:                            Date parsedate = fmt.parse(string);
4094:                            assertEquals("\"" + currentPat + "\".parse("
4095:                                    + string + ")", univ.format(date), univ
4096:                                    .format(parsedate));
4097:                        } catch (ParseException e3) {
4098:                            errln("FAIL: \"" + currentPat + "\".parse("
4099:                                    + string + ") => " + e3);
4100:                            continue;
4101:                        }
4102:                    } else if (control.equals("pf") || control.equals("P")) {
4103:                        // 'p'
4104:                        String string = data[i++];
4105:                        String datestr = data[i++];
4106:                        String string2 = string;
4107:                        if (control.length() == 2) {
4108:                            string2 = data[i++];
4109:                        }
4110:
4111:                        Date date = null;
4112:                        try {
4113:                            date = ref.parse(datestr);
4114:                        } catch (ParseException e) {
4115:                            errln("FAIL: Internal test error; can't parse "
4116:                                    + datestr);
4117:                            continue;
4118:                        }
4119:                        try {
4120:                            Date parsedate = fmt.parse(string);
4121:                            assertEquals("\"" + currentPat + "\".parse("
4122:                                    + string + ")", univ.format(date), univ
4123:                                    .format(parsedate));
4124:                        } catch (ParseException e2) {
4125:                            errln("FAIL: \"" + currentPat + "\".parse("
4126:                                    + string + ") => " + e2);
4127:                            continue;
4128:                        }
4129:                        // 'f'
4130:                        assertEquals("\"" + currentPat + "\".format(" + datestr
4131:                                + ")", string2, fmt.format(date));
4132:                    } else {
4133:                        errln("FAIL: Invalid control string " + control);
4134:                        return;
4135:                    }
4136:                }
4137:            }
4138:            /*
4139:            public void TestJB4757(){
4140:                DateFormat dfmt = DateFormat.getDateInstance(DateFormat.FULL, ULocale.ROOT);
4141:            }
4142:             */
4143:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.