Package io.deephaven.parquet.base
Class ParquetTimeUtils
java.lang.Object
io.deephaven.parquet.base.ParquetTimeUtils
Internal library with utility methods for converting time data between Deephaven and Parquet.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable LocalDateTimeepochMicrosToLocalDateTimeUTC(long micros) Converts microseconds from the Epoch to aLocalDateTimein UTC timezone.static @Nullable LocalDateTimeepochMillisToLocalDateTimeUTC(long millis) Converts milliseconds from the Epoch to aLocalDateTimein UTC timezone.static @Nullable LocalDateTimeepochNanosToLocalDateTimeUTC(long nanos) Converts nanoseconds from the Epoch to aLocalDateTimein UTC timezone.static longepochNanosUTC(@Nullable LocalDateTime localDateTime) Returns nanoseconds from the Epoch for aLocalDateTimevalue in UTC timezone.
-
Constructor Details
-
ParquetTimeUtils
public ParquetTimeUtils()
-
-
Method Details
-
epochNanosUTC
Returns nanoseconds from the Epoch for aLocalDateTimevalue 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
Converts nanoseconds from the Epoch to aLocalDateTimein UTC timezone.- Parameters:
nanos- nanoseconds since Epoch- Returns:
nullif the input isQueryConstants.NULL_LONG; otherwise the input nanoseconds from the Epoch converted to aLocalDateTimein UTC timezone
-
epochMicrosToLocalDateTimeUTC
Converts microseconds from the Epoch to aLocalDateTimein UTC timezone.- Parameters:
micros- microseconds since Epoch- Returns:
nullif the input isQueryConstants.NULL_LONG; otherwise the input microseconds from the Epoch converted to aLocalDateTimein UTC timezone
-
epochMillisToLocalDateTimeUTC
Converts milliseconds from the Epoch to aLocalDateTimein UTC timezone.- Parameters:
millis- milliseconds since Epoch- Returns:
nullif the input isQueryConstants.NULL_LONG; otherwise the input milliseconds from the Epoch converted to aLocalDateTimein UTC timezone
-