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
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable LocalDateTime
epochMicrosToLocalDateTimeUTC
(long micros) Converts microseconds from the Epoch to aLocalDateTime
in UTC timezone.static @Nullable LocalDateTime
epochMillisToLocalDateTimeUTC
(long millis) Converts milliseconds from the Epoch to aLocalDateTime
in UTC timezone.static @Nullable LocalDateTime
epochNanosToLocalDateTimeUTC
(long nanos) Converts nanoseconds from the Epoch to aLocalDateTime
in UTC timezone.static long
epochNanosUTC
(@Nullable LocalDateTime localDateTime) Returns nanoseconds from the Epoch for aLocalDateTime
value in UTC timezone.
-
Constructor Details
-
ParquetTimeUtils
public ParquetTimeUtils()
-
-
Method Details
-
epochNanosUTC
Returns nanoseconds from the Epoch for aLocalDateTime
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
Converts nanoseconds from the Epoch to aLocalDateTime
in UTC timezone.- Parameters:
nanos
- nanoseconds since Epoch- Returns:
null
if the input isQueryConstants.NULL_LONG
; otherwise the input nanoseconds from the Epoch converted to aLocalDateTime
in UTC timezone
-
epochMicrosToLocalDateTimeUTC
Converts microseconds from the Epoch to aLocalDateTime
in UTC timezone.- Parameters:
micros
- microseconds since Epoch- Returns:
null
if the input isQueryConstants.NULL_LONG
; otherwise the input microseconds from the Epoch converted to aLocalDateTime
in UTC timezone
-
epochMillisToLocalDateTimeUTC
Converts milliseconds from the Epoch to aLocalDateTime
in UTC timezone.- Parameters:
millis
- milliseconds since Epoch- Returns:
null
if the input isQueryConstants.NULL_LONG
; otherwise the input milliseconds from the Epoch converted to aLocalDateTime
in UTC timezone
-