Class ParquetTimeUtils

java.lang.Object
io.deephaven.parquet.base.ParquetTimeUtils

public class ParquetTimeUtils extends Object
Internal library with utility methods for converting time data between Deephaven and Parquet.
  • Constructor Details

    • ParquetTimeUtils

      public ParquetTimeUtils()
  • Method Details

    • epochNanosUTC

      public static long epochNanosUTC(@Nullable @Nullable LocalDateTime localDateTime)
      Returns nanoseconds from the Epoch for a LocalDateTime value in UTC timezone.
      Parameters:
      localDateTime - the local date time to compute the Epoch offset for
      Returns:
      nanoseconds since Epoch, or a NULL_LONG value if the local date time is null
    • epochNanosToLocalDateTimeUTC

      @Nullable public static @Nullable LocalDateTime epochNanosToLocalDateTimeUTC(long nanos)
      Converts nanoseconds from the Epoch to a LocalDateTime in UTC timezone.
      Parameters:
      nanos - nanoseconds since Epoch
      Returns:
      null if the input is QueryConstants.NULL_LONG; otherwise the input nanoseconds from the Epoch converted to a LocalDateTime in UTC timezone
    • epochMicrosToLocalDateTimeUTC

      @Nullable public static @Nullable LocalDateTime epochMicrosToLocalDateTimeUTC(long micros)
      Converts microseconds from the Epoch to a LocalDateTime in UTC timezone.
      Parameters:
      micros - microseconds since Epoch
      Returns:
      null if the input is QueryConstants.NULL_LONG; otherwise the input microseconds from the Epoch converted to a LocalDateTime in UTC timezone
    • epochMillisToLocalDateTimeUTC

      @Nullable public static @Nullable LocalDateTime epochMillisToLocalDateTimeUTC(long millis)
      Converts milliseconds from the Epoch to a LocalDateTime in UTC timezone.
      Parameters:
      millis - milliseconds since Epoch
      Returns:
      null if the input is QueryConstants.NULL_LONG; otherwise the input milliseconds from the Epoch converted to a LocalDateTime in UTC timezone