Examples of useDaylightTime()


Examples of com.ibm.icu.util.BasicTimeZone.useDaylightTime()

        if (otz.inDaylightTime(d) != vtz.inDaylightTime(d)) {
            errln("FAIL: inDaylightTime returned different results in VTimeZone and OlsonTimeZone");
        }

        // useDaylightTime
        if (otz.useDaylightTime() != vtz.useDaylightTime()) {
            errln("FAIL: useDaylightTime returned different results in VTimeZone and OlsonTimeZone");
        }

        // setRawOffset
        final int RAW = -10*HOUR;
 
View Full Code Here

Examples of com.ibm.icu.util.SimpleTimeZone.useDaylightTime()

    public void TestGenericAPI() {
        String id = "NewGMT";
        int offset = 12345;

        SimpleTimeZone zone = new SimpleTimeZone(offset, id);
        if (zone.useDaylightTime()) errln("FAIL: useDaylightTime should return false");

        TimeZone zoneclone = (TimeZone)zone.clone();
        if (!zoneclone.equals(zone)) errln("FAIL: clone or operator== failed");
        zoneclone.setID("abc");
        if (zoneclone.equals(zone)) errln("FAIL: clone or operator!= failed");
View Full Code Here

Examples of com.ibm.icu.util.SimpleTimeZone.useDaylightTime()

    {
        // ErrorCode status = ZERO_ERROR;

        int offset = (int)(60*60*1000*1.75); // Pick a weird offset
        SimpleTimeZone zone = new SimpleTimeZone(offset, "TestZone");
        if (zone.useDaylightTime()) errln("FAIL: useDaylightTime should return false");

        // Establish our expected transition times.  Do this with a non-DST
        // calendar with the (above) declared local offset.
        GregorianCalendar gc = new GregorianCalendar(zone);
        gc.clear();
View Full Code Here

Examples of com.ibm.icu.util.SimpleTimeZone.useDaylightTime()

                                               (int)(0.5 * millisPerHour));

        if (tz.getRawOffset() != -5 * millisPerHour)
            errln("Got back a raw offset of " + (tz.getRawOffset() / millisPerHour) +
                  " hours instead of -5 hours.");
        if (!tz.useDaylightTime())
            errln("Test time zone should use DST but claims it doesn't.");
        if (tz.getDSTSavings() != 0.5 * millisPerHour)
            errln("Set DST offset to 0.5 hour, but got back " + (tz.getDSTSavings() /
                                                                 millisPerHour) + " hours instead.");

View Full Code Here

Examples of com.ibm.icu.util.TimeZone.useDaylightTime()

        logln("The timezone is " + time_zone.getID());

        if (time_zone.inDaylightTime(d) != true)
            errln("FAIL: inDaylightTime returned false");

        if (time_zone.useDaylightTime() != true)
            errln("FAIL: useDaylightTime returned false");

        if (time_zone.getRawOffset() != -8*millisPerHour)
            errln( "FAIL: getRawOffset returned wrong value");

View Full Code Here

Examples of com.ibm.icu.util.TimeZone.useDaylightTime()

            boolean fdy = ftz.useDaylightTime();

            String cdn = ctz.getDisplayName();
            long cro = ctz.getRawOffset();
            long cds = ctz.getDSTSavings();
            boolean cdy = ctz.useDaylightTime();

            if (!fdn.equals(cdn)) {
                logln("display name (" + funkyName + ", " + correctName + ") expected: " + cdn + " but got: " + fdn);
            } else if (fro != cro) {
                logln("offset (" + funkyName + ", " + correctName + ") expected: " + cro + " but got: " + fro);
View Full Code Here

Examples of com.ibm.icu.util.VTimeZone.useDaylightTime()

        if (otz.inDaylightTime(d) != vtz.inDaylightTime(d)) {
            errln("FAIL: inDaylightTime returned different results in VTimeZone and OlsonTimeZone");
        }

        // useDaylightTime
        if (otz.useDaylightTime() != vtz.useDaylightTime()) {
            errln("FAIL: useDaylightTime returned different results in VTimeZone and OlsonTimeZone");
        }

        // setRawOffset
        final int RAW = -10*HOUR;
 
View Full Code Here

Examples of java.util.SimpleTimeZone.useDaylightTime()

    SimpleTimeZone z = new SimpleTimeZone(1234, "Z1",
      Calendar.APRIL, 15, 0, 2*60*60*1000,
      Calendar.NOVEMBER, 22, 0, 2*60*60*1000);
    harness.check(z.getRawOffset(), 1234);
    harness.check(z.getID(), "Z1");
    harness.check(z.useDaylightTime());
    harness.check(z.getDSTSavings(), 60*60*1000);

    // null id should throw exception
    try
    {
View Full Code Here

Examples of java.util.SimpleTimeZone.useDaylightTime()

    SimpleTimeZone z = new SimpleTimeZone(1234, "Z1",
      Calendar.APRIL, 15, 0, 2*60*60*1000,
      Calendar.NOVEMBER, 22, 0, 2*60*60*1000, 123456);
    harness.check(z.getRawOffset(), 1234);
    harness.check(z.getID(), "Z1");
    harness.check(z.useDaylightTime());
    harness.check(z.getDSTSavings(), 123456);
   
    // null id should throw exception
    try
    {
View Full Code Here

Examples of java.util.SimpleTimeZone.useDaylightTime()

      Calendar.APRIL, 15, 0, 2*60*60*1000, SimpleTimeZone.UTC_TIME,
      Calendar.NOVEMBER, 22, 0, 2*60*60*1000, SimpleTimeZone.UTC_TIME,
      123456);
    harness.check(z.getRawOffset(), 1234);
    harness.check(z.getID(), "Z1");
    harness.check(z.useDaylightTime());
    harness.check(z.getDSTSavings(), 123456);

    // null id should throw exception
    try
    {
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.