Examples of minusSeconds()


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

    DateTime lastSeen = val.getLastSeen();
   
    DateTime now = new DateTime();
    DateTime before = now.minus(rateInMillis);
    //give it 15 seconds before it really should be up to date in the table
    before = before.minusSeconds(15);
   
    if(lastSeen.isBefore(before)) {
      return false;
    }
    return true;
View Full Code Here

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

    if (start == null) {
      // 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);
View Full Code Here

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

   * @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);
    } else {
View Full Code Here

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

   * @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);
    } else {
View Full Code Here

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

    if (start == null) {
      // 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);
View Full Code Here

Examples of org.threeten.bp.Instant.minusSeconds()

//    name varchar(255) not null,
//    time_zone varchar(255),
//    detail blob not null,
    Instant now = Instant.now();
    _exgMaster.setClock(Clock.fixed(now, ZoneOffset.UTC));
    _version1Instant = now.minusSeconds(100);
    _version2Instant = now.minusSeconds(50);
    s_logger.debug("test data now:   {}", _version1Instant);
    s_logger.debug("test data later: {}", _version2Instant);
    FudgeContext fudgeContext = OpenGammaFudgeContext.getInstance();
    LobHandler lobHandler = new DefaultLobHandler();
View Full Code Here

Examples of org.threeten.bp.Instant.minusSeconds()

//    time_zone varchar(255),
//    detail blob not null,
    Instant now = Instant.now();
    _exgMaster.setClock(Clock.fixed(now, ZoneOffset.UTC));
    _version1Instant = now.minusSeconds(100);
    _version2Instant = now.minusSeconds(50);
    s_logger.debug("test data now:   {}", _version1Instant);
    s_logger.debug("test data later: {}", _version2Instant);
    FudgeContext fudgeContext = OpenGammaFudgeContext.getInstance();
    LobHandler lobHandler = new DefaultLobHandler();
    final JdbcOperations template = _exgMaster.getDbConnector().getJdbcOperations();
View Full Code Here

Examples of org.threeten.bp.Instant.minusSeconds()

//    corr_to_instant timestamp not null,
//    name varchar(255) not null,
//    sec_type varchar(255) not null,
    Instant now = Instant.now();
    _secMaster.setClock(Clock.fixed(now, ZoneOffset.UTC));
    _version1Instant = now.minusSeconds(100);
    _version2Instant = now.minusSeconds(50);
    s_logger.debug("test data now:   {}", _version1Instant);
    s_logger.debug("test data later: {}", _version2Instant);
    final JdbcOperations template = _secMaster.getDbConnector().getJdbcOperations();
    template.update("INSERT INTO sec_security VALUES (?,?,?,?,?, ?,?,?,?)",
View Full Code Here

Examples of org.threeten.bp.Instant.minusSeconds()

//    name varchar(255) not null,
//    sec_type varchar(255) not null,
    Instant now = Instant.now();
    _secMaster.setClock(Clock.fixed(now, ZoneOffset.UTC));
    _version1Instant = now.minusSeconds(100);
    _version2Instant = now.minusSeconds(50);
    s_logger.debug("test data now:   {}", _version1Instant);
    s_logger.debug("test data later: {}", _version2Instant);
    final JdbcOperations template = _secMaster.getDbConnector().getJdbcOperations();
    template.update("INSERT INTO sec_security VALUES (?,?,?,?,?, ?,?,?,?)",
        101, 101, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, "TestSecurity101", "EQUITY", "D");
View Full Code Here

Examples of org.threeten.bp.Instant.minusSeconds()

//    exchange_scheme varchar(255),
//    exchange_value varchar(255),
//    currency_iso varchar(255),
    Instant now = Instant.now();
    _holMaster.setClock(Clock.fixed(now, ZoneOffset.UTC));
    _version1Instant = now.minusSeconds(100);
    _version2Instant = now.minusSeconds(50);
    s_logger.debug("test data now:   {}", _version1Instant);
    s_logger.debug("test data later: {}", _version2Instant);
    final JdbcOperations template = _holMaster.getDbConnector().getJdbcOperations();
    template.update("INSERT INTO hol_holiday VALUES (?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?)",
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.