Code example for SimpleTimeZone

Methods: getDSTSavingsgetRawOffsetinDaylightTimeuseDaylightTimegetID

0
	 *        int, int, int, int, int, int, int, int, int) 
	 */ 
	public void test_ConstructorILjava_lang_StringIIIIIIIII() { 
		// Test for method java.util.SimpleTimeZone(int, java.lang.String, int, 
		// int, int, int, int, int, int, int, int) 
		SimpleTimeZone st = new SimpleTimeZone(1000, "TEST", Calendar.NOVEMBER,
				1, Calendar.SUNDAY, 0, Calendar.NOVEMBER, -1, Calendar.SUNDAY,
				0, 1000 * 60 * 60); 
		assertTrue("Incorrect TZ constructed", st
				.inDaylightTime(new GregorianCalendar(1998, Calendar.NOVEMBER,
						13).getTime()));
		assertTrue("Incorrect TZ constructed", !(st
				.inDaylightTime(new GregorianCalendar(1998, Calendar.OCTOBER,
						13).getTime())));
		assertEquals("Incorrect TZ constructed", "TEST", st.getID());
		assertEquals("Incorrect TZ constructed", 1000, st.getRawOffset());
		assertTrue("Incorrect TZ constructed", st.useDaylightTime());
		assertTrue("Incorrect TZ constructed",
				st.getDSTSavings() == 1000 * 60 * 60);
	} 
 
	/** 
	 * @tests java.util.SimpleTimeZone#SimpleTimeZone(int, java.lang.String, 
	 *        int, int, int, int, int, int, int, int, int, int, int) 
Experience pair programming with AI  Get Codota for Java