TimestampDatum extends Datum { @Override public long asInt8() { return timestamp; } TimestampDatum(long timestamp); long getTimestamp(); int getEpoch(); long getJavaTimestamp(); int getCenturyOfEra(); int getYear(); int getMonthOfYear(); int getDayOfYear(); int getDayOfWeek(); int getWeekOfYear(); int getDayOfMonth(); int getHourOfDay(); int getMinuteOfHour(); int getSecondOfMinute(); int getMillisOfSecond(); int getUnixTime(); String toString(); String asChars(TimeZone timeZone, boolean includeTimeZone); String toString(TimeZone timeZone, boolean includeTimeZone); @Override long asInt8(); @Override String asChars(); String toChars(String format); @Override int size(); @Override byte [] asByteArray(); @Override Datum equalsTo(Datum datum); @Override int compareTo(Datum datum); @Override boolean equals(Object obj); @Override Datum plus(Datum datum); @Override Datum minus(Datum datum); @Override int hashCode(); TimeMeta toTimeMeta(); static final int SIZE; }
@Test public final void testAsInt8() { Datum d = DatumFactory.createTimestmpDatumWithJavaMillis(unixtime * 1000); long javaTime = unixtime * 1000; assertEquals(DateTimeUtil.javaTimeToJulianTime(javaTime), d.asInt8()); }