Package java.util

Examples of java.util.TimeZone.inDaylightTime()


    cal.set(2007, Calendar.JANUARY, 1, 2, 31, 0);
    harness.check(!tz5.inDaylightTime(new Date(cal.getTimeInMillis())));

    cal.set(2007, Calendar.JANUARY, 3, 2, 31, 0);
    harness.check(!tz5.inDaylightTime(new Date(cal.getTimeInMillis())));

    cal.set(2007, Calendar.JANUARY, 3, 2, 31, 0);
    harness.check(!tz5.inDaylightTime(new Date(cal.getTimeInMillis())));

    cal.set(2007, Calendar.MARCH, 11, 3, 30, 0);
View Full Code Here


    cal.set(2007, Calendar.JANUARY, 3, 2, 31, 0);
    harness.check(!tz5.inDaylightTime(new Date(cal.getTimeInMillis())));

    cal.set(2007, Calendar.JANUARY, 3, 2, 31, 0);
    harness.check(!tz5.inDaylightTime(new Date(cal.getTimeInMillis())));

    cal.set(2007, Calendar.MARCH, 11, 3, 30, 0);
    harness.check(!tz5.inDaylightTime(new Date(cal.getTimeInMillis())));

    cal.set(2007, Calendar.MARCH, 11, 3, 31, 0);
View Full Code Here

    cal.set(2007, Calendar.JANUARY, 3, 2, 31, 0);
    harness.check(!tz5.inDaylightTime(new Date(cal.getTimeInMillis())));

    cal.set(2007, Calendar.MARCH, 11, 3, 30, 0);
    harness.check(!tz5.inDaylightTime(new Date(cal.getTimeInMillis())));

    cal.set(2007, Calendar.MARCH, 11, 3, 31, 0);
    harness.check(tz5.inDaylightTime(new Date(cal.getTimeInMillis())));

    harness.checkPoint("test 7");
View Full Code Here

    cal.set(2007, Calendar.MARCH, 11, 3, 30, 0);
    harness.check(!tz5.inDaylightTime(new Date(cal.getTimeInMillis())));

    cal.set(2007, Calendar.MARCH, 11, 3, 31, 0);
    harness.check(tz5.inDaylightTime(new Date(cal.getTimeInMillis())));

    harness.checkPoint("test 7");

    TimeZone tz6 = new SimpleTimeZone(
      12600000, "Test4",
View Full Code Here

      Calendar.NOVEMBER, -16, -Calendar.THURSDAY, 18000000 - 3600000-12600000,
      SimpleTimeZone.UTC_TIME,
      3600000);

    cal.set(2007, Calendar.MARCH, 6, 1, 29, 0);
    harness.check(!tz6.inDaylightTime(new Date(cal.getTimeInMillis())));

    cal.set(2007, Calendar.MARCH, 6, 1, 30, 0);
    harness.check(tz6.inDaylightTime(new Date(cal.getTimeInMillis())));

    cal.set(2007, Calendar.NOVEMBER, 15, 0, 29, 0);
View Full Code Here

    cal.set(2007, Calendar.MARCH, 6, 1, 29, 0);
    harness.check(!tz6.inDaylightTime(new Date(cal.getTimeInMillis())));

    cal.set(2007, Calendar.MARCH, 6, 1, 30, 0);
    harness.check(tz6.inDaylightTime(new Date(cal.getTimeInMillis())));

    cal.set(2007, Calendar.NOVEMBER, 15, 0, 29, 0);
    harness.check(tz6.inDaylightTime(new Date(cal.getTimeInMillis())));

    cal.set(2007, Calendar.NOVEMBER, 15, 0, 30, 0);
View Full Code Here

    cal.set(2007, Calendar.MARCH, 6, 1, 30, 0);
    harness.check(tz6.inDaylightTime(new Date(cal.getTimeInMillis())));

    cal.set(2007, Calendar.NOVEMBER, 15, 0, 29, 0);
    harness.check(tz6.inDaylightTime(new Date(cal.getTimeInMillis())));

    cal.set(2007, Calendar.NOVEMBER, 15, 0, 30, 0);
    harness.check(!tz6.inDaylightTime(new Date(cal.getTimeInMillis())));
  }
View Full Code Here

    cal.set(2007, Calendar.NOVEMBER, 15, 0, 29, 0);
    harness.check(tz6.inDaylightTime(new Date(cal.getTimeInMillis())));

    cal.set(2007, Calendar.NOVEMBER, 15, 0, 30, 0);
    harness.check(!tz6.inDaylightTime(new Date(cal.getTimeInMillis())));
  }

}
View Full Code Here

        Date date = cal.getTime() ;
        TimeZone z = cal.getTimeZone() ;
        int tzOff = z.getRawOffset() ;
        int tz = tzOff ;

        if ( z.inDaylightTime(date) )
        {
            int tzDst = z.getDSTSavings() ;
            tz = tz + tzDst ;
        }
       
View Full Code Here

                                offs = tz.getOffset(dl);
                                d = new Date(dl);
                                app.getExifReader().setUTCOffset(offs);
                                app.message("Assuming that EXIF DateTimeOriginal tags are given in "
                                        + tz.getDisplayName(
                                                tz.inDaylightTime(d),
                                                TimeZone.LONG, Locale.US) + ":");
                                app.message("\tUTC offset at " + d + " was "
                                        + offs / 1000 + " s.");
                                break;
                            }
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.