Examples of useDaylightTime()


Examples of java.util.SimpleTimeZone.useDaylightTime()

    SimpleTimeZone st = new SimpleTimeZone(1000, "TEST");
    assertEquals("Incorrect TZ constructed", "TEST", st.getID());
    assertTrue("Incorrect TZ constructed: " + "returned wrong offset", st
        .getRawOffset() == 1000);
    assertTrue("Incorrect TZ constructed" + "using daylight savings", !st
        .useDaylightTime());
  }

  /**
   * @tests java.util.SimpleTimeZone#SimpleTimeZone(int, java.lang.String,
View Full Code Here

Examples of java.util.SimpleTimeZone.useDaylightTime()

    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());
  }

  /**
   * @tests java.util.SimpleTimeZone#SimpleTimeZone(int, java.lang.String,
   *        int, int, int, int, int, int, int, int, int)
View Full Code Here

Examples of java.util.SimpleTimeZone.useDaylightTime()

    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);
  }

  /**
 
View Full Code Here

Examples of java.util.SimpleTimeZone.useDaylightTime()

    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, Calendar.SUNDAY, 0);
    st.setEndRule(Calendar.NOVEMBER, -1, Calendar.SUNDAY, 0);
    assertTrue("StartRule improperly set1", st.useDaylightTime());
    assertTrue("StartRule improperly set2", st
        .inDaylightTime(new GregorianCalendar(1998, Calendar.NOVEMBER,
            13).getTime()));
    assertTrue("StartRule improperly set3", !(st
        .inDaylightTime(new GregorianCalendar(1998, Calendar.OCTOBER,
View Full Code Here

Examples of java.util.SimpleTimeZone.useDaylightTime()

    SimpleTimeZone st = (SimpleTimeZone) TimeZone.getDefault().clone();
    // Spec indicates that both end and start must be set or result is
    // undefined
    st.setStartRule(Calendar.NOVEMBER, 8, Calendar.SUNDAY, 1, false);
    st.setEndRule(Calendar.NOVEMBER, 15, Calendar.SUNDAY, 1, true);
    assertTrue("StartRule improperly set1", st.useDaylightTime());
    assertTrue("StartRule improperly set2", st
        .inDaylightTime((new GregorianCalendar(1999, Calendar.NOVEMBER,
            7, 12, 0).getTime())));
    assertTrue("StartRule improperly set3", st
        .inDaylightTime((new GregorianCalendar(1999, Calendar.NOVEMBER,
View Full Code Here

Examples of java.util.SimpleTimeZone.useDaylightTime()

    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,
View Full Code Here

Examples of java.util.SimpleTimeZone.useDaylightTime()

    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, Calendar.SUNDAY, 0);
    st.setEndRule(Calendar.NOVEMBER, -1, Calendar.SUNDAY, 0);
    assertTrue("StartRule improperly set1", st.useDaylightTime());
    assertTrue("StartRule improperly set2", st
        .inDaylightTime((new GregorianCalendar(1998, Calendar.NOVEMBER,
            13).getTime())));
    assertTrue("StartRule improperly set3", !(st
        .inDaylightTime(new GregorianCalendar(1998, Calendar.OCTOBER,
View Full Code Here

Examples of java.util.SimpleTimeZone.useDaylightTime()

    SimpleTimeZone st = (SimpleTimeZone) TimeZone.getDefault().clone();
    // Spec indicates that both end and start must be set or result is
    // undefined
    st.setStartRule(Calendar.NOVEMBER, 1, Calendar.SUNDAY, 1, true);
    st.setEndRule(Calendar.NOVEMBER, 15, Calendar.SUNDAY, 1, false);
    assertTrue("StartRule improperly set1", st.useDaylightTime());
    assertTrue("StartRule improperly set2", st
        .inDaylightTime((new GregorianCalendar(1999, Calendar.NOVEMBER,
            7, 12, 0).getTime())));
    assertTrue("StartRule improperly set3", st
        .inDaylightTime((new GregorianCalendar(1999, Calendar.NOVEMBER,
View Full Code Here

Examples of java.util.SimpleTimeZone.useDaylightTime()

   * @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
        .useDaylightTime());
    // 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);
View Full Code Here

Examples of java.util.SimpleTimeZone.useDaylightTime()

        .useDaylightTime());
    // 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
        .useDaylightTime());
  }

  /**
   * Sets up the fixture, for example, open a network connection. This method
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.