Examples of minusMillis()


Examples of org.joda.time.DateTime.minusMillis()

        }

        assertion.setSubject(subject);

        Conditions conditions = (new ConditionsBuilder()).buildObject();
        conditions.setNotBefore(now.minusMillis(3600000));
        conditions.setNotOnOrAfter(now.plusMillis(3600000));
        assertion.setConditions(conditions);
        return assertion;
    }
View Full Code Here

Examples of org.joda.time.DateTime.minusMillis()

        authnStatement.setAuthenticationInstant(now);

        org.opensaml.saml1.core.Conditions conditions = (new org.opensaml.saml1.core.impl.ConditionsBuilder())
                .buildObject();
        conditions.setNotBefore(now.minusMillis(3600000));
        conditions.setNotOnOrAfter(now.plusMillis(3600000));

        String issuerURL = "http://www.sopera.de/SAML1";

        org.opensaml.saml1.core.Assertion assertion = (new org.opensaml.saml1.core.impl.AssertionBuilder())
View Full Code Here

Examples of org.joda.time.DateTime.minusMillis()

                int offset = dtz.getStandardOffset(offsetCalculationInstant)
                        - dtz.getOffset(offsetCalculationInstant);

                if (!isDst && !dtz.isStandardOffset(dt.getMillis())) {
                    dt = dt.minusMillis(offset);
                }
                if (isDst && dtz.isStandardOffset(dt.getMillis())) {
                    dt = dt.plusMillis(offset);
                }
            }
View Full Code Here

Examples of org.joda.time.DateTime.minusMillis()

   * Get the timestamp rounded to the next half hour
   * @return
   */
  private DateTime getNextHalfHour() {
    DateTime next = DateTime.now();
    next = next.minusMillis(next.getMillisOfSecond());
    next = next.minusSeconds(next.getSecondOfMinute());

    if (next.getMinuteOfHour() > 30) {
      next = next.minusMinutes(next.getMinuteOfHour());
      next = next.plusMinutes(60);
View Full Code Here

Examples of org.joda.time.DateTime.minusMillis()

        case DataType.BIGDECIMAL:
            return ((BigDecimal)v).subtract(BigDecimal.ONE);
        case DataType.DATETIME:
            DateTime dt = (DateTime) v;
            if (dt.getMillisOfSecond() != 0) {
                return dt.minusMillis(1);
            } else if (dt.getSecondOfMinute() != 0) {
                return dt.minusSeconds(1);
            } else if (dt.getMinuteOfHour() != 0) {
                return dt.minusMinutes(1);
            } else if (dt.getHourOfDay() != 0) {
View Full Code Here

Examples of org.joda.time.DateTime.minusMillis()

                int offset = dtz.getStandardOffset(offsetCalculationInstant)
                        - dtz.getOffset(offsetCalculationInstant);

                if (!isDst && !dtz.isStandardOffset(dt.getMillis())) {
                    dt = dt.minusMillis(offset);
                }
                if (isDst && dtz.isStandardOffset(dt.getMillis())) {
                    dt = dt.plusMillis(offset);
                }
            }
View Full Code Here

Examples of org.joda.time.DateTime.minusMillis()

    }

    Interval theInterval;
    if (interval == null || interval.isEmpty()) {
      DateTime now = new DateTime();
      theInterval = new Interval(now.minusMillis(SEGMENT_HISTORY_MILLIS), now);
    } else {
      theInterval = new Interval(interval);
    }

    for (DataSegment segment : segments) {
View Full Code Here

Examples of org.joda.time.DateTime.minusMillis()

    }
   
    Interval theInterval;
    if (interval == null || interval.isEmpty()) {
      DateTime now = new DateTime();
      theInterval = new Interval(now.minusMillis(SEGMENT_HISTORY_MILLIS), now);
    } else {
      theInterval = new Interval(interval);
    }

    for (DataSegment segment : segments) {
View Full Code Here

Examples of org.joda.time.DateTime.minusMillis()

        case DataType.DOUBLE:
            return Double.valueOf((Double) v - 1);
        case DataType.DATETIME:
            DateTime dt = (DateTime) v;
            if (dt.getMillisOfSecond() != 0) {
                return dt.minusMillis(1);
            } else if (dt.getSecondOfMinute() != 0) {
                return dt.minusSeconds(1);
            } else if (dt.getMinuteOfHour() != 0) {
                return dt.minusMinutes(1);
            } else if (dt.getHourOfDay() != 0) {
View Full Code Here

Examples of org.joda.time.DateTime.minusMillis()

      // set start to current time, rounded to hours
      DateTime startDate = DateTime.now();
      startDate = startDate.plusHours(1);
      startDate = startDate.minusMinutes(startDate.getMinuteOfHour());
      startDate = startDate.minusSeconds(startDate.getSecondOfMinute());
      startDate = startDate.minusMillis(startDate.getMillisOfSecond());
      start = startDate.toString();
    }
    ObjectNode startObj = JOM.createObjectNode();
    startObj.put("dateTime", start);
    event.put("start", startObj);
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.