@Test public final void testAsText() { Datum d = DatumFactory.createTimestamp("1980-04-01 01:50:01"); Datum copy = DatumFactory.createTimestamp(d.asChars()); assertEquals(d, copy); d = DatumFactory.createTimestamp("1980-04-01 01:50:01.10"); copy = DatumFactory.createTimestamp(d.asChars()); assertEquals(d, copy); }
public static String asChars(TimeMeta tm, TimeZone timeZone, boolean includeTimeZone) { DateTimeUtil.toUserTimezone(tm, timeZone); if (includeTimeZone) { tm.timeZone = tm.getZonedOffset(DateTimeUtil.toJulianTimestamp(tm), timeZone) / 1000; } return DateTimeUtil.encodeDateTime(tm, DateStyle.ISO_DATES); }
TimestampDatum extends Datum { public static String asChars(TimeMeta tm, TimeZone timeZone, boolean includeTimeZone) { DateTimeUtil.toUserTimezone(tm, timeZone); if (includeTimeZone) { tm.timeZone = tm.getZonedOffset(DateTimeUtil.toJulianTimestamp(tm), timeZone) / 1000; } return DateTimeUtil.encodeDateTime(tm, DateStyle.ISO_DATES); } }
TimestampDatum extends Datum { public static String asChars(TimeMeta tm, TimeZone timeZone, boolean includeTimeZone) { DateTimeUtil.toUserTimezone(tm, timeZone); if (includeTimeZone) { tm.timeZone = tm.getZonedOffset(DateTimeUtil.toJulianTimestamp(tm), timeZone) / 1000; } return DateTimeUtil.encodeDateTime(tm, DateStyle.ISO_DATES); } TimestampDatum(long timestamp); }
TimestampDatum extends Datum { public static String asChars(TimeMeta tm, TimeZone timeZone, boolean includeTimeZone) { DateTimeUtil.toUserTimezone(tm, timeZone); if (includeTimeZone) { tm.timeZone = tm.getZonedOffset(DateTimeUtil.toJulianTimestamp(tm), timeZone) / 1000; } return DateTimeUtil.encodeDateTime(tm, DateStyle.ISO_DATES); } 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(); static String asChars(TimeMeta tm, TimeZone timeZone, boolean includeTimeZone); String toString(TimeZone timeZone, boolean includeTimeZone); @Override long asInt8(); @Override String asChars(); @Override int size(); @Override byte [] asByteArray(); @Override byte[] asTextBytes(); @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(); @Override TimeMeta asTimeMeta(); }
TimestampDatum extends Datum { public static String asChars(TimeMeta tm, TimeZone timeZone, boolean includeTimeZone) { DateTimeUtil.toUserTimezone(tm, timeZone); if (includeTimeZone) { tm.timeZone = tm.getZonedOffset(DateTimeUtil.toJulianTimestamp(tm), timeZone) / 1000; } return DateTimeUtil.encodeDateTime(tm, DateStyle.ISO_DATES); } 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(); static String asChars(TimeMeta tm, TimeZone timeZone, boolean includeTimeZone); String toString(TimeZone timeZone, boolean includeTimeZone); @Override long asInt8(); @Override String asChars(); @Override int size(); @Override byte [] asByteArray(); @Override byte[] asTextBytes(); @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(); @Override TimeMeta asTimeMeta(); static final int SIZE; }