Uses of Class
org.threeten.bp.ZonedDateTime
Packages that use ZonedDateTime
Package
Description
The main API for dates, times, instants, and durations.
Support for calendar systems other than the default ISO.
-
Uses of ZonedDateTime in org.threeten.bp
Methods in org.threeten.bp that return ZonedDateTimeModifier and TypeMethodDescriptionLocalDate.atStartOfDay(ZoneId zone)
Combines this date with a time-zone to create aZonedDateTime
at the start of the dayCombines this instant with a time-zone to create aZonedDateTime
.Combines this date-time with a time-zone to create aZonedDateTime
.OffsetDateTime.atZoneSameInstant(ZoneId zone)
Combines this date-time with a time-zone to create aZonedDateTime
ensuring that the result has the same instant.OffsetDateTime.atZoneSimilarLocal(ZoneId zone)
Combines this date-time with a time-zone to create aZonedDateTime
trying to keep the same local date and time.static ZonedDateTime
ZonedDateTime.from(TemporalAccessor temporal)
Obtains an instance ofZonedDateTime
from a temporal object.ZonedDateTime.minus(long amountToSubtract, TemporalUnit unit)
Returns a copy of this date-time with the specified period subtracted.ZonedDateTime.minus(TemporalAmount amount)
Returns a copy of this date-time with the specified period subtracted.ZonedDateTime.minusDays(long days)
Returns a copy of thisZonedDateTime
with the specified period in days subtracted.ZonedDateTime.minusHours(long hours)
Returns a copy of thisZonedDateTime
with the specified period in hours subtracted.ZonedDateTime.minusMinutes(long minutes)
Returns a copy of thisZonedDateTime
with the specified period in minutes subtracted.ZonedDateTime.minusMonths(long months)
Returns a copy of thisZonedDateTime
with the specified period in months subtracted.ZonedDateTime.minusNanos(long nanos)
Returns a copy of thisZonedDateTime
with the specified period in nanoseconds subtracted.ZonedDateTime.minusSeconds(long seconds)
Returns a copy of thisZonedDateTime
with the specified period in seconds subtracted.ZonedDateTime.minusWeeks(long weeks)
Returns a copy of thisZonedDateTime
with the specified period in weeks subtracted.ZonedDateTime.minusYears(long years)
Returns a copy of thisZonedDateTime
with the specified period in years subtracted.static ZonedDateTime
ZonedDateTime.now()
Obtains the current date-time from the system clock in the default time-zone.static ZonedDateTime
Obtains the current date-time from the specified clock.static ZonedDateTime
Obtains the current date-time from the system clock in the specified time-zone.static ZonedDateTime
ZonedDateTime.of(int year, int month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond, ZoneId zone)
Obtains an instance ofZonedDateTime
from a year, month, day, hour, minute, second, nanosecond and time-zone.static ZonedDateTime
Obtains an instance ofZonedDateTime
from a local date and time.static ZonedDateTime
ZonedDateTime.of(LocalDateTime localDateTime, ZoneId zone)
Obtains an instance ofZonedDateTime
from a local date-time.static ZonedDateTime
Obtains an instance ofZonedDateTime
from anInstant
.static ZonedDateTime
ZonedDateTime.ofInstant(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone)
Obtains an instance ofZonedDateTime
from the instant formed by combining the local date-time and offset.static ZonedDateTime
ZonedDateTime.ofLocal(LocalDateTime localDateTime, ZoneId zone, ZoneOffset preferredOffset)
Obtains an instance ofZonedDateTime
from a local date-time using the preferred offset if possible.static ZonedDateTime
ZonedDateTime.ofStrict(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone)
Obtains an instance ofZonedDateTime
strictly validating the combination of local date-time, offset and zone ID.static ZonedDateTime
ZonedDateTime.parse(CharSequence text)
Obtains an instance ofZonedDateTime
from a text string such as2007-12-23T10:15:30+01:00[Europe/Paris]
.static ZonedDateTime
ZonedDateTime.parse(CharSequence text, DateTimeFormatter formatter)
Obtains an instance ofZonedDateTime
from a text string using a specific formatter.ZonedDateTime.plus(long amountToAdd, TemporalUnit unit)
Returns a copy of this date-time with the specified period added.ZonedDateTime.plus(TemporalAmount amount)
Returns a copy of this date-time with the specified period added.ZonedDateTime.plusDays(long days)
Returns a copy of thisZonedDateTime
with the specified period in days added.ZonedDateTime.plusHours(long hours)
Returns a copy of thisZonedDateTime
with the specified period in hours added.ZonedDateTime.plusMinutes(long minutes)
Returns a copy of thisZonedDateTime
with the specified period in minutes added.ZonedDateTime.plusMonths(long months)
Returns a copy of thisZonedDateTime
with the specified period in months added.ZonedDateTime.plusNanos(long nanos)
Returns a copy of thisZonedDateTime
with the specified period in nanoseconds added.ZonedDateTime.plusSeconds(long seconds)
Returns a copy of thisZonedDateTime
with the specified period in seconds added.ZonedDateTime.plusWeeks(long weeks)
Returns a copy of thisZonedDateTime
with the specified period in weeks added.ZonedDateTime.plusYears(long years)
Returns a copy of thisZonedDateTime
with the specified period in years added.OffsetDateTime.toZonedDateTime()
Converts this date-time to aZonedDateTime
using the offset as the zone ID.ZonedDateTime.truncatedTo(TemporalUnit unit)
Returns a copy of thisZonedDateTime
with the time truncated.ZonedDateTime.with(TemporalAdjuster adjuster)
Returns an adjusted copy of this date-time.ZonedDateTime.with(TemporalField field, long newValue)
Returns a copy of this date-time with the specified field set to a new value.ZonedDateTime.withDayOfMonth(int dayOfMonth)
Returns a copy of thisZonedDateTime
with the day-of-month value altered.ZonedDateTime.withDayOfYear(int dayOfYear)
Returns a copy of thisZonedDateTime
with the day-of-year altered.ZonedDateTime.withEarlierOffsetAtOverlap()
Returns a copy of this date-time changing the zone offset to the earlier of the two valid offsets at a local time-line overlap.ZonedDateTime.withFixedOffsetZone()
Returns a copy of this date-time with the zone ID set to the offset.ZonedDateTime.withHour(int hour)
Returns a copy of thisZonedDateTime
with the hour-of-day value altered.ZonedDateTime.withLaterOffsetAtOverlap()
Returns a copy of this date-time changing the zone offset to the later of the two valid offsets at a local time-line overlap.ZonedDateTime.withMinute(int minute)
Returns a copy of thisZonedDateTime
with the minute-of-hour value altered.ZonedDateTime.withMonth(int month)
Returns a copy of thisZonedDateTime
with the month-of-year value altered.ZonedDateTime.withNano(int nanoOfSecond)
Returns a copy of thisZonedDateTime
with the nano-of-second value altered.ZonedDateTime.withSecond(int second)
Returns a copy of thisZonedDateTime
with the second-of-minute value altered.ZonedDateTime.withYear(int year)
Returns a copy of thisZonedDateTime
with the year value altered.ZonedDateTime.withZoneSameInstant(ZoneId zone)
Returns a copy of this date-time with a different time-zone, retaining the instant.ZonedDateTime.withZoneSameLocal(ZoneId zone)
Returns a copy of this date-time with a different time-zone, retaining the local date-time if possible. -
Uses of ZonedDateTime in org.threeten.bp.chrono
Methods in org.threeten.bp.chrono that return ZonedDateTimeModifier and TypeMethodDescriptionIsoChronology.zonedDateTime(Instant instant, ZoneId zone)
Obtains an ISO zoned date-time from an instant.IsoChronology.zonedDateTime(TemporalAccessor temporal)
Obtains an ISO zoned date-time from another date-time object.