Package org.apache.iceberg.util
Class DateTimeUtil
- java.lang.Object
-
- org.apache.iceberg.util.DateTimeUtil
-
public class DateTimeUtil extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.time.OffsetDateTime
EPOCH
static java.time.LocalDate
EPOCH_DAY
static long
MICROS_PER_MILLIS
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.time.LocalDate
dateFromDays(int daysFromEpoch)
static int
daysFromDate(java.time.LocalDate date)
static int
daysFromInstant(java.time.Instant instant)
static java.lang.String
formatTimestampMillis(long millis)
static long
microsFromInstant(java.time.Instant instant)
static long
microsFromTime(java.time.LocalTime time)
static long
microsFromTimestamp(java.time.LocalDateTime dateTime)
static long
microsFromTimestamptz(java.time.OffsetDateTime dateTime)
static long
microsToMillis(long micros)
static java.time.LocalTime
timeFromMicros(long microFromMidnight)
static java.time.LocalDateTime
timestampFromMicros(long microsFromEpoch)
static java.time.OffsetDateTime
timestamptzFromMicros(long microsFromEpoch)
-
-
-
Field Detail
-
EPOCH
public static final java.time.OffsetDateTime EPOCH
-
EPOCH_DAY
public static final java.time.LocalDate EPOCH_DAY
-
MICROS_PER_MILLIS
public static final long MICROS_PER_MILLIS
- See Also:
- Constant Field Values
-
-
Method Detail
-
dateFromDays
public static java.time.LocalDate dateFromDays(int daysFromEpoch)
-
daysFromDate
public static int daysFromDate(java.time.LocalDate date)
-
daysFromInstant
public static int daysFromInstant(java.time.Instant instant)
-
timeFromMicros
public static java.time.LocalTime timeFromMicros(long microFromMidnight)
-
microsFromTime
public static long microsFromTime(java.time.LocalTime time)
-
timestampFromMicros
public static java.time.LocalDateTime timestampFromMicros(long microsFromEpoch)
-
microsFromInstant
public static long microsFromInstant(java.time.Instant instant)
-
microsFromTimestamp
public static long microsFromTimestamp(java.time.LocalDateTime dateTime)
-
microsToMillis
public static long microsToMillis(long micros)
-
timestamptzFromMicros
public static java.time.OffsetDateTime timestamptzFromMicros(long microsFromEpoch)
-
microsFromTimestamptz
public static long microsFromTimestamptz(java.time.OffsetDateTime dateTime)
-
formatTimestampMillis
public static java.lang.String formatTimestampMillis(long millis)
-
-