public final class ZonedDateTime extends Object implements Comparable<ZonedDateTime>, TemporalAccessor
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ZonedDateTime other) |
boolean |
equals(Object obj) |
String |
format(DateTimeFormatter formatter) |
ZoneOffset |
getOffset() |
ZoneId |
getZone() |
int |
hashCode() |
static ZonedDateTime |
now() |
static ZonedDateTime |
now(Clock clock) |
static ZonedDateTime |
of(LocalDate date,
LocalTime time,
ZoneId zone) |
static ZonedDateTime |
of(LocalDateTime dateTime,
ZoneId zone) |
static ZonedDateTime |
ofInstant(Instant instant,
ZoneId zone) |
static ZonedDateTime |
parse(CharSequence text) |
static ZonedDateTime |
parse(CharSequence text,
DateTimeFormatter formatter) |
Instant |
toInstant() |
LocalDateTime |
toLocalDateTime() |
String |
toString() |
public static ZonedDateTime now()
public static ZonedDateTime now(Clock clock)
public static ZonedDateTime of(LocalDate date, LocalTime time, ZoneId zone)
public static ZonedDateTime of(LocalDateTime dateTime, ZoneId zone)
public static ZonedDateTime ofInstant(Instant instant, ZoneId zone)
public static ZonedDateTime parse(CharSequence text)
public static ZonedDateTime parse(CharSequence text, DateTimeFormatter formatter)
public LocalDateTime toLocalDateTime()
public ZoneId getZone()
public ZoneOffset getOffset()
public Instant toInstant()
public String format(DateTimeFormatter formatter)
public int compareTo(ZonedDateTime other)
compareTo in interface Comparable<ZonedDateTime>Copyright © 2026. All rights reserved.