public abstract class DateTimeUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
formatInstant(TemporalAccessor instant)
Formats the given instant to ISO8601 format including three positions for milliseconds.
|
static Instant |
parseInstant(CharSequence timestamp)
Parse the given
timestamp into an Instant. |
public static Instant parseInstant(CharSequence timestamp)
timestamp into an Instant. Unlike Instant.parse(CharSequence), this
method accepts ISO8601 timestamps from any offset, not only UTC.timestamp - an ISO8601 formatted timestampInstant representing the given timestampDateTimeFormatter.ISO_OFFSET_DATE_TIMEpublic static String formatInstant(TemporalAccessor instant)
instant - the instant to represent as ISO8601 dataCopyright © 2010–2023. All rights reserved.