Code example for SimpleTimeZone

Methods: inDaylightTime, setEndRule, setStartRule, useDaylightTime

0
	 * @tests java.util.SimpleTimeZone#setStartRule(int, int, int) 
	 */ 
	public void test_setStartRuleIII() { 
		// Test for method void java.util.SimpleTimeZone.setStartRule(int, int, 
		// int) 
		SimpleTimeZone st = new SimpleTimeZone(1000, "Test_TZ");
		// Spec indicates that both end and start must be set or result is 
		// undefined 
		st.setStartRule(Calendar.NOVEMBER, 1, 1);
		st.setEndRule(Calendar.DECEMBER, 1, 1);
		assertTrue("StartRule improperly set", st.useDaylightTime());
		assertTrue("StartRule improperly set", st
				.inDaylightTime((new GregorianCalendar(1998, Calendar.NOVEMBER,
						13).getTime())));
		assertTrue("StartRule improperly set", !(st
				.inDaylightTime(new GregorianCalendar(1998, Calendar.OCTOBER,
						13).getTime())));
 
	} 
 
	/**