Package java.util

Examples of java.util.TimeZone.inDaylightTime()


        return calendar.getTimeZone();
    }

    public static Duration getDaylightSavingsOffset(Date self) {
        TimeZone timeZone = getTimeZone(self);
        int millis = (timeZone.useDaylightTime() && timeZone.inDaylightTime(self))
                ? timeZone.getDSTSavings() : 0;
        return new TimeDuration(0, 0, 0, millis);
    }

    public static Duration getDaylightSavingsOffset(BaseDuration self) {
View Full Code Here


    protected void setCreationValues(Date pDate) {
        //TimeZone tz = theValue.getTimeZone();
        TimeZone tz = TimeZone.getDefault();
        int rawOffset = tz.getRawOffset();
        this.hoursFromGMT = (rawOffset / DateTimeData.millisPerHour) * -1;
        this.isDST = tz.inDaylightTime(pDate);
    }

    public void propertyChange(PropertyChangeEvent arg0) {
      // -----------------------------------------------------------------------
      // TF:29/01/2010:JCT-640:Changed this to invoke a method on the superclass
View Full Code Here

        newValue.add(Calendar.DAY_OF_MONTH, source2.day);
        newValue.add(Calendar.HOUR_OF_DAY, source2.hour);
        newValue.add(Calendar.MINUTE, source2.min);
        newValue.add(Calendar.SECOND, source2.sec);
        newValue.add(Calendar.MILLISECOND, (int)source2.msec);
        if(tz.inDaylightTime(newValue.getTime())){
            newValue.add(Calendar.HOUR_OF_DAY, -1);
        }
        setValue(newValue);
        super.reportChange();
        return this;
View Full Code Here

    Date date = new Date();
    DateFormat dateFormat =
            new java.text.SimpleDateFormat("yyyyMMdd'T'HH:mm:ss");
        TimeZone tz = dateFormat.getTimeZone();
    String tzName = dateFormat.getTimeZone().getDisplayName(
            tz.inDaylightTime(date), TimeZone.SHORT);
    dateFormat.setCalendar(
            Calendar.getInstance(TimeZone.getTimeZone("UTC")));
    IQTime time =
            new IQTime(dateFormat.format(date), tzName, date.toString());
    backend.send(new InfoQuery(to,"result",id,time));
View Full Code Here

    protected void setCreationValues(Date pDate) {
        //TimeZone tz = theValue.getTimeZone();
        TimeZone tz = TimeZone.getDefault();
        int rawOffset = tz.getRawOffset();
        this.hoursFromGMT = (rawOffset / DateTimeData.millisPerHour) * -1;
        this.isDST = tz.inDaylightTime(pDate);
    }

    public void propertyChange(PropertyChangeEvent arg0) {
      // -----------------------------------------------------------------------
      // TF:29/01/2010:JCT-640:Changed this to invoke a method on the superclass
View Full Code Here

        newValue.add(Calendar.DAY_OF_MONTH, source2.day);
        newValue.add(Calendar.HOUR_OF_DAY, source2.hour);
        newValue.add(Calendar.MINUTE, source2.min);
        newValue.add(Calendar.SECOND, source2.sec);
        newValue.add(Calendar.MILLISECOND, (int)source2.msec);
        if(tz.inDaylightTime(newValue.getTime())){
            newValue.add(Calendar.HOUR_OF_DAY, -1);
        }
        setValue(newValue);
        super.reportChange();
        return this;
View Full Code Here

    protected void setCreationValues(Date pDate) {
        //TimeZone tz = theValue.getTimeZone();
        TimeZone tz = TimeZone.getDefault();
        int rawOffset = tz.getRawOffset();
        this.hoursFromGMT = (rawOffset / DateTimeData.millisPerHour) * -1;
        this.isDST = tz.inDaylightTime(pDate);
    }

    public void propertyChange(PropertyChangeEvent arg0) {
      // -----------------------------------------------------------------------
      // TF:29/01/2010:JCT-640:Changed this to invoke a method on the superclass
View Full Code Here

        newValue.add(Calendar.DAY_OF_MONTH, source2.day);
        newValue.add(Calendar.HOUR_OF_DAY, source2.hour);
        newValue.add(Calendar.MINUTE, source2.min);
        newValue.add(Calendar.SECOND, source2.sec);
        newValue.add(Calendar.MILLISECOND, (int)source2.msec);
        if(tz.inDaylightTime(newValue.getTime())){
            newValue.add(Calendar.HOUR_OF_DAY, -1);
        }
        setValue(newValue);
        super.reportChange();
        return this;
View Full Code Here

    protected void setCreationValues(Date pDate) {
        //TimeZone tz = theValue.getTimeZone();
        TimeZone tz = TimeZone.getDefault();
        int rawOffset = tz.getRawOffset();
        this.hoursFromGMT = (rawOffset / DateTimeData.millisPerHour) * -1;
        this.isDST = tz.inDaylightTime(pDate);
    }

    public void propertyChange(PropertyChangeEvent arg0) {
      // -----------------------------------------------------------------------
      // TF:29/01/2010:JCT-640:Changed this to invoke a method on the superclass
View Full Code Here

        newValue.add(Calendar.DAY_OF_MONTH, source2.day);
        newValue.add(Calendar.HOUR_OF_DAY, source2.hour);
        newValue.add(Calendar.MINUTE, source2.min);
        newValue.add(Calendar.SECOND, source2.sec);
        newValue.add(Calendar.MILLISECOND, (int)source2.msec);
        if(tz.inDaylightTime(newValue.getTime())){
            newValue.add(Calendar.HOUR_OF_DAY, -1);
        }
        setValue(newValue);
        super.reportChange();
        return this;
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.