Examples of inDaylightTime()


Examples of java.util.SimpleTimeZone.inDaylightTime()

      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

Examples of java.util.SimpleTimeZone.inDaylightTime()

    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

Examples of java.util.SimpleTimeZone.inDaylightTime()

    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

Examples of java.util.SimpleTimeZone.inDaylightTime()

    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

Examples of java.util.TimeZone.inDaylightTime()

      // this is used to prevent duplicates in the list
      ArrayList descriptionList = new ArrayList();
      String[] zoneIds = TimeZone.getAvailableIDs();
      for (int i=0; i<zoneIds.length; i++) {
        TimeZone tz = TimeZone.getTimeZone(zoneIds[i]);
        String shortName = tz.getDisplayName(tz.inDaylightTime(today), TimeZone.SHORT);
        String longName = tz.getDisplayName(tz.inDaylightTime(today), TimeZone.LONG);
        int offset = tz.getOffset(today.getTime());
        int hour = offset / (60*60*1000);
        int min = Math.abs(offset / (60*1000)) % 60;
        StringBuffer description = new StringBuffer();
View Full Code Here

Examples of java.util.TimeZone.inDaylightTime()

      ArrayList descriptionList = new ArrayList();
      String[] zoneIds = TimeZone.getAvailableIDs();
      for (int i=0; i<zoneIds.length; i++) {
        TimeZone tz = TimeZone.getTimeZone(zoneIds[i]);
        String shortName = tz.getDisplayName(tz.inDaylightTime(today), TimeZone.SHORT);
        String longName = tz.getDisplayName(tz.inDaylightTime(today), TimeZone.LONG);
        int offset = tz.getOffset(today.getTime());
        int hour = offset / (60*60*1000);
        int min = Math.abs(offset / (60*1000)) % 60;
        StringBuffer description = new StringBuffer();
        description.append(shortName+": ");
View Full Code Here

Examples of java.util.TimeZone.inDaylightTime()

      TimeZone tz = TimeZone.getTimeZone(timeZoneID);
//      tz.setStartRule(Calendar.MARCH, -1, Calendar.SUNDAY,  2*60*60*1000);
//      tz.setEndRule(Calendar.OCTOBER, -1, Calendar.SUNDAY,  2*60*60*1000);

      date -= tz.getRawOffset();
      if (tz.inDaylightTime(sendTime)) {
        date -= 3600 * 1000;
      }

      return new SimpleDateFormat("yyyyMMddHHmm").format(new Date(date));
    }
View Full Code Here

Examples of java.util.TimeZone.inDaylightTime()

                    }
                    g.drawString("" + tmpdate.getDate(), j * sizex / 7 + 4,
                            30 + i * 15 - 3);
                    tmpdate.go(Calendar.DATE, 1);
                    if (timeZone != null
                            && timeZone.inDaylightTime(tmpdate.getTime())) {
                        tmpdate.add(Calendar.MILLISECOND, timeZone
                                .getDSTSavings());
                        timeZone = null;
                    }

View Full Code Here

Examples of java.util.TimeZone.inDaylightTime()

  public static String calendarToString(Calendar cal) {
    Calendar now = Calendar.getInstance();
    TimeZone tz = now.getTimeZone();
    int offset = tz.getRawOffset();

    if (tz.inDaylightTime(now.getTime())) {
      offset -= tz.getDSTSavings();
    }

    if (tz.inDaylightTime(cal.getTime())) {
      offset += tz.getDSTSavings();
View Full Code Here

Examples of java.util.TimeZone.inDaylightTime()

    if (tz.inDaylightTime(now.getTime())) {
      offset -= tz.getDSTSavings();
    }

    if (tz.inDaylightTime(cal.getTime())) {
      offset += tz.getDSTSavings();
    }

    Date d = new Date(cal.getTimeInMillis() - offset);
    return new SimpleDateFormat("yyyy-MM-dd").format(d); //$NON-NLS-1$
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.