Code example for SimpleTimeZone

0
        format.setTimeZone(tz0130);
        test.test(" Z", cal, " +0130", DateFormat.TIMEZONE_FIELD);
        format.setTimeZone(tzMinus0130);
        test.test(" Z", cal, " -0130", DateFormat.TIMEZONE_FIELD);
 
        format.setTimeZone(tz0001);
        test.test(" z", cal, " GMT+00:01", DateFormat.TIMEZONE_FIELD);
        test.test(" zzzz", cal, " GMT+00:01", DateFormat.TIMEZONE_FIELD);
        format.setTimeZone(tz0130);
        test.test(" z", cal, " GMT+01:30", DateFormat.TIMEZONE_FIELD);
        format.setTimeZone(tzMinus0130);
        test.test(" z", cal, " GMT-01:30", DateFormat.TIMEZONE_FIELD);
 
        format.setTimeZone(TimeZone.getTimeZone("America/New_York"));
        test.test(" z", cal, " EDT", DateFormat.TIMEZONE_FIELD);
        Calendar temp2 = new GregorianCalendar(1999, Calendar.JANUARY, 12);
        test.test(" z", temp2, " EST", DateFormat.TIMEZONE_FIELD);
        test.test(" zz", cal, " EDT", DateFormat.TIMEZONE_FIELD);
        test.test(" zzz", cal, " EDT", DateFormat.TIMEZONE_FIELD);
        test.test(" zzzz", cal, " Eastern Daylight Time", DateFormat.TIMEZONE_FIELD);
        test.test(" zzzz", temp2, " Eastern Standard Time", DateFormat.TIMEZONE_FIELD);