Class DateUtils
java.lang.Object
org.elasticsearch.xpack.esql.core.util.DateUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final DateTimeFormatterstatic final DateTimeFormatterstatic final intstatic final intstatic final intstatic final ZoneIdstatic final DateFormatter -
Method Summary
Modifier and TypeMethodDescriptionstatic ZonedDateTimeasDateTime(long millis) Creates a datetime from the millis since epoch (thus the time-zone is UTC).static ZonedDateTimeasDateTime(String dateFormat) Parses the given string into a DateTime using UTC as a default timezone.static ZonedDateTimeasDateTime(Instant instant) static ZonedDateTimeasDateTimeWithNanos(String dateFormat, ZoneId zoneId) Parses the given string into a ZonedDateTime using the provided timezone.static longasMillis(ZonedDateTime zonedDateTime) static Stringstatic StringtoString(ZonedDateTime dateTime)
-
Field Details
-
UTC
-
EMPTY
- See Also:
-
ISO_DATE_WITH_NANOS
-
ISO_TIME_WITH_NANOS
-
UTC_DATE_TIME_FORMATTER
-
SECONDS_PER_MINUTE
public static final int SECONDS_PER_MINUTE- See Also:
-
SECONDS_PER_HOUR
public static final int SECONDS_PER_HOUR- See Also:
-
SECONDS_PER_DAY
public static final int SECONDS_PER_DAY- See Also:
-
-
Method Details
-
asDateTimeWithNanos
Parses the given string into a ZonedDateTime using the provided timezone. -
toString
-
asDateTime
Creates a datetime from the millis since epoch (thus the time-zone is UTC). -
asDateTime
-
asMillis
-
asDateTime
Parses the given string into a DateTime using UTC as a default timezone. -
toString
-