Uses of Class
javax.time.calendar.ZonedDateTime
Packages that use ZonedDateTime
Package
Description
Provides classes to manage the human time scale including date, time,
date-time and time-zone representations.
-
Uses of ZonedDateTime in javax.time.calendar
Fields in javax.time.calendar with type parameters of type ZonedDateTimeModifier and TypeFieldDescriptionprivate static final CalendricalRule<ZonedDateTime>
ZonedDateTime.Rule.INSTANCE
Methods in javax.time.calendar that return ZonedDateTimeModifier and TypeMethodDescriptionLocalDate.atStartOfDayInZone
(TimeZone zone) Returns a zoned date-time from this date at the earliest valid time according to the rules in the time-zone.OffsetDate.atStartOfDayInZone
(TimeZone zone) Returns a zoned date-time from this date at the earliest valid time according to the rules in the time-zone ignoring the current offset.Returns a zoned date-time formed from this date-time and the specified time-zone.LocalDateTime.atZone
(TimeZone zone, ZoneResolver resolver) Returns a zoned date-time formed from this date-time and the specified time-zone taking control of what occurs in time-line gaps and overlaps.OffsetDateTime.atZoneSameInstant
(TimeZone zone) Returns a zoned date-time formed from the instant represented by this date-time and the specified time-zone.OffsetDateTime.atZoneSimilarLocal
(TimeZone zone) Returns a zoned date-time formed from this date-time and the specified time-zone.OffsetDateTime.atZoneSimilarLocal
(TimeZone zone, ZoneResolver resolver) Returns a zoned date-time formed from this date-time and the specified time-zone taking control of what occurs in time-line gaps and overlaps.ZonedDateTime.minus
(PeriodProvider periodProvider) Returns a copy of thisZonedDateTime
with the specified period subtracted.ZonedDateTime.minus
(PeriodProvider periodProvider, ZoneResolver resolver) Returns a copy of thisZonedDateTime
with the specified period subtracted.ZonedDateTime.minusDays
(long days) Returns a copy of thisZonedDateTime
with the specified period in days subtracted.ZonedDateTime.minusDuration
(int hours, int minutes, int seconds, long nanos) Returns a copy of thisZonedDateTime
with the specified duration subtracted.ZonedDateTime.minusDuration
(PeriodProvider periodProvider) Returns a copy of thisZonedDateTime
with the specified duration subtracted.ZonedDateTime.minusDuration
(Duration duration) Returns a copy of thisZonedDateTime
with the specified duration 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
ZonedDateTime.of
(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int nanoOfSecond, TimeZone zone) Obtains an instance ofZonedDateTime
from year, month, day, hour, minute, second, nanosecond and time-zone where the date-time must be valid for the time-zone.static ZonedDateTime
ZonedDateTime.of
(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int nanoOfSecond, TimeZone zone, ZoneResolver resolver) Obtains an instance ofZonedDateTime
from year, month, day, hour, minute, second, nanosecond and time-zone providing a resolver to handle an invalid date-time.static ZonedDateTime
ZonedDateTime.of
(int year, MonthOfYear monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int nanoOfSecond, TimeZone zone) Obtains an instance ofZonedDateTime
from year, month, day, hour, minute, second, nanosecond and time-zone where the date-time must be valid for the time-zone.static ZonedDateTime
ZonedDateTime.of
(int year, MonthOfYear monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int nanoOfSecond, TimeZone zone, ZoneResolver resolver) Obtains an instance ofZonedDateTime
from year, month, day, hour, minute, second, nanosecond and time-zone providing a resolver to handle an invalid date-time.static ZonedDateTime
ZonedDateTime.of
(DateProvider dateProvider, TimeProvider timeProvider, TimeZone zone) Obtains an instance ofZonedDateTime
from a local date and time where the date-time must be valid for the time-zone.static ZonedDateTime
ZonedDateTime.of
(DateProvider dateProvider, TimeProvider timeProvider, TimeZone zone, ZoneResolver resolver) Obtains an instance ofZonedDateTime
from a local date and time providing a resolver to handle an invalid date-time.static ZonedDateTime
ZonedDateTime.of
(DateTimeProvider dateTimeProvider, TimeZone zone) Obtains an instance ofZonedDateTime
from a local date-time where the date-time must be valid for the time-zone.static ZonedDateTime
ZonedDateTime.of
(DateTimeProvider dateTimeProvider, TimeZone zone, ZoneResolver resolver) Obtains an instance ofZonedDateTime
from a local date-time providing a resolver to handle an invalid date-time.static ZonedDateTime
ZonedDateTime.of
(OffsetDateTime dateTime, TimeZone zone) Obtains an instance ofZonedDateTime
from anOffsetDateTime
ensuring that the offset provided is valid for the time-zone.static ZonedDateTime
ZonedDateTime.ofEpochSeconds
(long epochSeconds, TimeZone zone) Obtains an instance ofZonedDateTime
using seconds from the epoch of 1970-01-01T00:00:00Z.static ZonedDateTime
ZonedDateTime.ofInstant
(OffsetDateTime dateTime, TimeZone zone) Obtains an instance ofZonedDateTime
from the instant of anOffsetDateTime
.static ZonedDateTime
ZonedDateTime.ofInstant
(InstantProvider instantProvider, TimeZone zone) Obtains an instance ofZonedDateTime
from anInstant
.static ZonedDateTime
Obtains an instance ofZonedDateTime
from a text string such as2007-12-03T10:15:30+01:00[Europe/Paris]
.static ZonedDateTime
ZonedDateTime.parse
(String text, DateTimeFormatter formatter) Obtains an instance ofZonedDateTime
from a text string using a specific formatter.ZonedDateTime.plus
(PeriodProvider periodProvider) Returns a copy of thisZonedDateTime
with the specified period added.ZonedDateTime.plus
(PeriodProvider periodProvider, ZoneResolver resolver) Returns a copy of thisZonedDateTime
with the specified period added.ZonedDateTime.plusDays
(long days) Returns a copy of thisZonedDateTime
with the specified period in days added.ZonedDateTime.plusDuration
(int hours, int minutes, int seconds, long nanos) Returns a copy of thisZonedDateTime
with the specified duration added.ZonedDateTime.plusDuration
(PeriodProvider periodProvider) Returns a copy of thisZonedDateTime
with the specified duration added.ZonedDateTime.plusDuration
(Duration duration) Returns a copy of thisZonedDateTime
with the specified duration 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.private static ZonedDateTime
ZonedDateTime.resolve
(LocalDateTime dateTime, ZonedDateTime oldDateTime, TimeZone zone, ZoneResolver resolver) Obtains an instance ofZonedDateTime
.ZonedDateTime.with
(DateAdjuster adjuster) Returns a copy of thisZonedDateTime
with the date altered using the adjuster.ZonedDateTime.with
(DateAdjuster adjuster, ZoneResolver resolver) Returns a copy of thisZonedDateTime
with the date altered using the adjuster, providing a resolver to handle an invalid date-time.ZonedDateTime.with
(TimeAdjuster adjuster) Returns a copy of thisZonedDateTime
with the time altered using the adjuster.ZonedDateTime.with
(TimeAdjuster adjuster, ZoneResolver resolver) Returns a copy of thisZonedDateTime
with the time altered using the adjuster, providing a resolver to handle an invalid date-time.ZonedDateTime.withDate
(int year, int monthOfYear, int dayOfMonth) Returns a copy of thisZonedDateTime
with the date values altered.ZonedDateTime.withDateTime
(DateTimeProvider dateTimeProvider) Returns a copy of this ZonedDateTime with a different local date-time.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 ZonedDateTime changing the zone offset to the earlier of the two valid offsets at a local time-line overlap.ZonedDateTime.withHourOfDay
(int hourOfDay) Returns a copy of thisZonedDateTime
with the hour-of-day value altered.ZonedDateTime.withLaterOffsetAtOverlap()
Returns a copy of this ZonedDateTime changing the zone offset to the later of the two valid offsets at a local time-line overlap.ZonedDateTime.withMinuteOfHour
(int minuteOfHour) Returns a copy of thisZonedDateTime
with the minute-of-hour value altered.ZonedDateTime.withMonthOfYear
(int monthOfYear) Returns a copy of thisZonedDateTime
with the month-of-year value altered.ZonedDateTime.withNanoOfSecond
(int nanoOfSecond) Returns a copy of thisZonedDateTime
with the nano-of-second value altered.ZonedDateTime.withSecondOfMinute
(int secondOfMinute) Returns a copy of thisZonedDateTime
with the second-of-minute value altered.ZonedDateTime.withTime
(int hourOfDay, int minuteOfHour) Returns a copy of thisZonedDateTime
with the time values altered.ZonedDateTime.withTime
(int hourOfDay, int minuteOfHour, int secondOfMinute) Returns a copy of thisZonedDateTime
with the time values altered.ZonedDateTime.withTime
(int hourOfDay, int minuteOfHour, int secondOfMinute, int nanoOfSecond) Returns a copy of thisZonedDateTime
with the time values altered.ZonedDateTime.withYear
(int year) Returns a copy of thisZonedDateTime
with the year value altered.ZonedDateTime.withZoneSameInstant
(TimeZone zone) Returns a copy of this ZonedDateTime with a different time-zone, retaining the instant.ZonedDateTime.withZoneSameLocal
(TimeZone zone) Returns a copy of this ZonedDateTime with a different time-zone, retaining the local date-time if possible.ZonedDateTime.withZoneSameLocal
(TimeZone zone, ZoneResolver resolver) Returns a copy of this ZonedDateTime with a different time-zone, retaining the local date-time if possible.Clock.zonedDateTime()
Gets the current zoned date-time.Clock.zonedDateTimeToMinute()
Gets the current zoned date-time with a resolution of minutes.Clock.zonedDateTimeToSecond()
Gets the current zoned date-time with a resolution of seconds.Methods in javax.time.calendar that return types with arguments of type ZonedDateTimeModifier and TypeMethodDescriptionstatic CalendricalRule<ZonedDateTime>
ZonedDateTime.rule()
Gets the rule forZonedDateTime
.Methods in javax.time.calendar with parameters of type ZonedDateTimeModifier and TypeMethodDescriptionint
ZonedDateTime.compareTo
(ZonedDateTime other) Compares thisZonedDateTime
to another date-time based on the UTC equivalent date-times then time-zone unique key.boolean
ZonedDateTime.equalInstant
(ZonedDateTime other) Checks if the instant of this date-time is equal to that of the specified date-time.boolean
ZonedDateTime.isAfter
(ZonedDateTime other) Checks if the instant of this date-time is after that of the specified date-time.boolean
ZonedDateTime.isBefore
(ZonedDateTime other) Checks if the instant of this date-time is before that of the specified date-time.private static ZonedDateTime
ZonedDateTime.resolve
(LocalDateTime dateTime, ZonedDateTime oldDateTime, TimeZone zone, ZoneResolver resolver) Obtains an instance ofZonedDateTime
.final OffsetDateTime
ZoneResolver.resolve
(TimeZone zone, LocalDateTime newDateTime, ZonedDateTime oldDateTime) Resolves the new local date-time to an offset date-time using the zone.