Class DateUtility

java.lang.Object
org.apache.arrow.vector.util.DateUtility

public class DateUtility extends Object
Utility class for Date, DateTime, TimeStamp, Interval data types.
  • Field Details

  • Method Details

    • getDateTimeFormatter

      public static DateTimeFormatter getDateTimeFormatter()
      Returns the date time formatter used to parse date strings.
    • getTimeFormatter

      public static DateTimeFormatter getTimeFormatter()
      Returns time formatter used to parse time strings.
    • getLocalDateTimeFromEpochMilli

      public static LocalDateTime getLocalDateTimeFromEpochMilli(long epochMillis, String timeZone)
      Convert milliseconds from epoch to a LocalDateTime with timeZone offset.
      Parameters:
      epochMillis - milliseconds from epoch
      timeZone - current timeZone
      Returns:
      LocalDateTime object with timeZone offset
    • getLocalDateTimeFromEpochMilli

      public static LocalDateTime getLocalDateTimeFromEpochMilli(long epochMillis)
      Convert milliseconds from epoch to a LocalDateTime with UTC offset.
    • getLocalDateTimeFromEpochMicro

      public static LocalDateTime getLocalDateTimeFromEpochMicro(long epochMicros, String timeZone)
      Convert microseconds from epoch to a LocalDateTime with timeZone offset.
      Parameters:
      epochMicros - microseconds from epoch
      timeZone - current timeZone
      Returns:
      LocalDateTime object with timeZone offset
    • getLocalDateTimeFromEpochMicro

      public static LocalDateTime getLocalDateTimeFromEpochMicro(long epochMicros)
      Convert microseconds from epoch to a LocalDateTime with UTC offset.
    • getLocalDateTimeFromEpochNano

      public static LocalDateTime getLocalDateTimeFromEpochNano(long epochNanos, String timeZone)
      Convert nanoseconds from epoch to a LocalDateTime with timeZone offset.
      Parameters:
      epochNanos - nanoseconds from epoch
      timeZone - current timeZone
      Returns:
      LocalDateTime object with timeZone offset
    • getLocalDateTimeFromEpochNano

      public static LocalDateTime getLocalDateTimeFromEpochNano(long epochNanos)
      Convert nanoseconds from epoch to a LocalDateTime with UTC offset.