Class DateUtils

java.lang.Object
org.elasticsearch.xpack.esql.core.util.DateUtils

public class DateUtils extends Object
  • Field Details

  • Method Details

    • asDateTimeWithNanos

      public static ZonedDateTime asDateTimeWithNanos(String dateFormat, ZoneId zoneId)
      Parses the given string into a ZonedDateTime using the provided timezone.
    • toString

      public static String toString(Object value)
    • asDateTime

      public static ZonedDateTime asDateTime(long millis)
      Creates a datetime from the millis since epoch (thus the time-zone is UTC).
    • asDateTime

      public static ZonedDateTime asDateTime(Instant instant)
    • asMillis

      public static long asMillis(ZonedDateTime zonedDateTime)
    • asDateTime

      public static ZonedDateTime asDateTime(String dateFormat)
      Parses the given string into a DateTime using UTC as a default timezone.
    • toString

      public static String toString(ZonedDateTime dateTime)