Examples of plusMillis()


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

                if (!isDst && !dtz.isStandardOffset(dt.getMillis())) {
                    dt = dt.minusMillis(offset);
                }
                if (isDst && dtz.isStandardOffset(dt.getMillis())) {
                    dt = dt.plusMillis(offset);
                }
            }
        } catch (org.joda.time.IllegalFieldValueException e) {
            throw runtime.newArgumentError("time out of range");
        }
View Full Code Here

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

        case DataType.DOUBLE:
            return Double.valueOf((Double) v + 1);
        case DataType.DATETIME:
            DateTime dt = (DateTime) v;
            if (dt.getMillisOfSecond() != 0) {
                return dt.plusMillis(1);
            } else if (dt.getSecondOfMinute() != 0) {
                return dt.plusSeconds(1);
            } else if (dt.getMinuteOfHour() != 0) {
                return dt.plusMinutes(1);
            } else if (dt.getHourOfDay() != 0) {
View Full Code Here

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

  public void testGetStartingTime() {
    DateTime startingTime = new DateTime();
    TestStep newTestStep = new TestStep();

    if (!((newTestStep.getStartingTime() == startingTime) || (newTestStep
        .getStartingTime().isBefore(startingTime.plusMillis(100))))) {
      fail("Starting time not Equal");
    }

  }
View Full Code Here

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

  public void testGetFinishingTime() {
    DateTime finishingTime = new DateTime();
    TestStep newTestStep = new TestStep();
    newTestStep.finish();
    if (!((newTestStep.getFinishingTime() == finishingTime) || (newTestStep
        .getFinishingTime().isBefore(finishingTime.plusMillis(100))))) {
      fail("Finishing time not Equal");
    }
  }

  /**
 
View Full Code Here

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

    TestStepGroup testStepGroupNew = mkEmptyTestStepGroup();
    assertNull(testStepGroupNew.getStartingTime());
    DateTime startingTime = new DateTime();
    testStepGroupNew.addTestStep(getOKTestStep());
    if (!((testStepGroupNew.getStartingTime() == startingTime) || (testStepGroupNew
        .getStartingTime().isBefore(startingTime.plusMillis(100))))) {
      fail("Starting time not Equal");
    }

  }
 
View Full Code Here

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

    DateTime finishingTime = new DateTime();
    testStepGroupNew.addTestStep(getErrorTestStep().finish());

    if (!((testStepGroupNew.getFinishingTime() == finishingTime) || (testStepGroupNew
        .getFinishingTime().isBefore(finishingTime.plusMillis(100))))) {
      fail("Finishing time not Equal");
    }
  }

  @Test
View Full Code Here

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

    pigValueRangeTest("junitTypeTest1", "date", "datetime", null, d.toString(),
      d.toString(FORMAT_4_DATE), FORMAT_4_DATE);
    pigValueRangeTestOverflow("junitTypeTest2", "date", "datetime", HCatBaseStorer.OOR_VALUE_OPT_VALUES.Null,
      d.plusHours(2).toString(), FORMAT_4_DATE);
    pigValueRangeTestOverflow("junitTypeTest2", "date", "datetime", HCatBaseStorer.OOR_VALUE_OPT_VALUES.Null,
      d.plusMillis(20).toString(), FORMAT_4_DATE);
    pigValueRangeTestOverflow("junitTypeTest2", "date", "datetime", HCatBaseStorer.OOR_VALUE_OPT_VALUES.Throw,
      d.plusMillis(12).toString(), FORMAT_4_DATE);
    pigValueRangeTestOverflow("junitTypeTest3", "date", "datetime", HCatBaseStorer.OOR_VALUE_OPT_VALUES.Throw,
      d.plusMinutes(1).toString(), FORMAT_4_DATE);
  }
View Full Code Here

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

    pigValueRangeTestOverflow("junitTypeTest2", "date", "datetime", HCatBaseStorer.OOR_VALUE_OPT_VALUES.Null,
      d.plusHours(2).toString(), FORMAT_4_DATE);
    pigValueRangeTestOverflow("junitTypeTest2", "date", "datetime", HCatBaseStorer.OOR_VALUE_OPT_VALUES.Null,
      d.plusMillis(20).toString(), FORMAT_4_DATE);
    pigValueRangeTestOverflow("junitTypeTest2", "date", "datetime", HCatBaseStorer.OOR_VALUE_OPT_VALUES.Throw,
      d.plusMillis(12).toString(), FORMAT_4_DATE);
    pigValueRangeTestOverflow("junitTypeTest3", "date", "datetime", HCatBaseStorer.OOR_VALUE_OPT_VALUES.Throw,
      d.plusMinutes(1).toString(), FORMAT_4_DATE);
  }
  /**
   * Note that the value that comes back from Hive will have local TZ on it.  Using local is
View Full Code Here

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

            // 1.9 will observe fractional seconds *if* not given usec
            if (!args[5].isNil()
                    && args[6].isNil()) {
                double secs = RubyFloat.num2dbl(args[5]);
                int int_millis = (int) (secs * 1000) % 1000;
                dt = dt.plusMillis(int_millis);
                nanos = ((long) (secs * 1000000000) % 1000000);
            }

            dt = dt.withZoneRetainFields(dtz);

View Full Code Here

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

    pigValueRangeTest("junitTypeTest1", "date", "datetime", null, d.toString(),
      d.toString(FORMAT_4_DATE), FORMAT_4_DATE);
    pigValueRangeTestOverflow("junitTypeTest2", "date", "datetime", HCatBaseStorer.OOR_VALUE_OPT_VALUES.Null,
      d.plusHours(2).toString(), FORMAT_4_DATE);
    pigValueRangeTestOverflow("junitTypeTest2", "date", "datetime", HCatBaseStorer.OOR_VALUE_OPT_VALUES.Null,
      d.plusMillis(20).toString(), FORMAT_4_DATE);
    pigValueRangeTestOverflow("junitTypeTest2", "date", "datetime", HCatBaseStorer.OOR_VALUE_OPT_VALUES.Throw,
      d.plusMillis(12).toString(), FORMAT_4_DATE);
    pigValueRangeTestOverflow("junitTypeTest3", "date", "datetime", HCatBaseStorer.OOR_VALUE_OPT_VALUES.Throw,
      d.plusMinutes(1).toString(), FORMAT_4_DATE);
  }
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.