Code example for SimpleTimeZone

Methods: cloneinDaylightTimesetStartYear

    public void test_clone_SimpleTimeZone() { 
        SimpleTimeZone stz = new SimpleTimeZone(21600000, "Central Standard Time");
        stz.inDaylightTime(new Date());
    // http://b/3049014 
    public void testCustomTimeZoneDisplayNames() { 
        TimeZone tz0001 = new SimpleTimeZone(60000, "ONE MINUTE");
        TimeZone tz0130 = new SimpleTimeZone(5400000, "ONE HOUR, THIRTY");
        TimeZone tzMinus0130 = new SimpleTimeZone(-5400000, "NEG ONE HOUR, THIRTY");
        assertEquals("GMT+00:01", tz0001.getDisplayName(false, TimeZone.SHORT, Locale.US));
        assertEquals("GMT+01:30", tz0130.getDisplayName(false, TimeZone.SHORT, Locale.US));
        assertEquals("GMT-01:30", tzMinus0130.getDisplayName(false, TimeZone.SHORT, Locale.US));
Connect your IDE to all the code out there  Get Codota for Java