public class DateTimeUtils extends Object
Modifier and Type | Field and Description |
---|---|
static DateTimeFormatter |
DATE_TIME_FORMATTER |
Constructor and Description |
---|
DateTimeUtils() |
Modifier and Type | Method and Description |
---|---|
static ZonedDateTime |
retrieveLogDateTime(String date)
Parses an "dd/MMM/yyyy:HH:mm:ss Z" formatted
String to a ZonedDateTime . |
static String |
toPrettyDuration(Instant from,
Instant to)
|
public static final DateTimeFormatter DATE_TIME_FORMATTER
public static ZonedDateTime retrieveLogDateTime(@NonNull String date) throws ParseException
String
to a ZonedDateTime
.date
- String
date time representationZonedDateTime
parsed from the "dd/MMM/yyyy:HH:mm:ss Z"
formatted String
ParseException
- if the String
to parse doesn't is not in the
"dd/MMM/yyyy:HH:mm:ss Z" formatNullPointerException
- if the String
to parse is nullCopyright © 2019. All rights reserved.