Java Utililty Methods ZonedDateTime to

List of utility methods to do ZonedDateTime to

Description

The list of methods to do ZonedDateTime to are organized into topic(s).

Method

DatetoDate(@Nullable ZonedDateTime dt)
Convert the given ZonedDateTime to a Date
if (dt == null)
    return null;
return new Date(dt.toInstant().toEpochMilli());
DatetoDate(Optional date)
to Date
if (date.isPresent()) {
    return Date.from(date.get().toInstant());
} else {
    return null;