Code example for SimpleTimeZone

Methods: setEndRulesetStartRuleuseDaylightTime

	 * @tests java.util.SimpleTimeZone#useDaylightTime() 
	public void test_useDaylightTime() { 
		// Test for method boolean java.util.SimpleTimeZone.useDaylightTime() 
		SimpleTimeZone st = new SimpleTimeZone(1000, "Test_TZ");
		assertTrue("useDaylightTime returned incorrect value", !st
		// Spec indicates that both end and start must be set or result is 
		// undefined 
		st.setStartRule(Calendar.NOVEMBER, 1, Calendar.SUNDAY, 0);
		st.setEndRule(Calendar.NOVEMBER, -1, Calendar.SUNDAY, 0);
		assertTrue("useDaylightTime returned incorrect value", st
	 * Sets up the fixture, for example, open a network connection. This method 
	 * is called before a test is executed. 
Contextual code suggestions in your IDE  Get Codota for Java