Uses of Class
org.threeten.bp.ZoneOffset
Packages that use ZoneOffset
Package
Description
The main API for dates, times, instants, and durations.
Support for calendar systems other than the default ISO.
Access to date and time using fields and units.
Support for time-zones and their rules.
-
Uses of ZoneOffset in org.threeten.bp
Fields in org.threeten.bp declared as ZoneOffsetModifier and TypeFieldDescriptionstatic ZoneOffset
ZoneOffset.MAX
Constant for the maximum supported offset.static ZoneOffset
ZoneOffset.MIN
Constant for the maximum supported offset.static ZoneOffset
ZoneOffset.UTC
The time-zone offset for UTC, with an ID of 'Z'.Methods in org.threeten.bp that return ZoneOffsetModifier and TypeMethodDescriptionstatic ZoneOffset
ZoneOffset.from(TemporalAccessor temporal)
Obtains an instance ofZoneOffset
from a temporal object.OffsetDateTime.getOffset()
Gets the zone offset, such as '+01:00'.OffsetTime.getOffset()
Gets the zone offset, such as '+01:00'.ZonedDateTime.getOffset()
Gets the zone offset, such as '+01:00'.static ZoneOffset
Obtains an instance ofZoneOffset
using the ID.static ZoneOffset
ZoneOffset.ofHours(int hours)
Obtains an instance ofZoneOffset
using an offset in hours.static ZoneOffset
ZoneOffset.ofHoursMinutes(int hours, int minutes)
Obtains an instance ofZoneOffset
using an offset in hours and minutes.static ZoneOffset
ZoneOffset.ofHoursMinutesSeconds(int hours, int minutes, int seconds)
Obtains an instance ofZoneOffset
using an offset in hours, minutes and seconds.static ZoneOffset
ZoneOffset.ofTotalSeconds(int totalSeconds)
Obtains an instance ofZoneOffset
specifying the total offset in secondsMethods in org.threeten.bp with parameters of type ZoneOffsetModifier and TypeMethodDescriptionInstant.atOffset(ZoneOffset offset)
Combines this instant with an offset to create anOffsetDateTime
.LocalDateTime.atOffset(ZoneOffset offset)
Combines this date-time with an offset to create anOffsetDateTime
.LocalTime.atOffset(ZoneOffset offset)
Combines this time with an offset to create anOffsetTime
.int
ZoneOffset.compareTo(ZoneOffset other)
Compares this offset to another offset in descending order.static OffsetDateTime
OffsetDateTime.of(int year, int month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond, ZoneOffset offset)
Obtains an instance ofOffsetDateTime
from a year, month, day, hour, minute, second, nanosecond and offset.static OffsetDateTime
OffsetDateTime.of(LocalDate date, LocalTime time, ZoneOffset offset)
Obtains an instance ofOffsetDateTime
from a date, time and offset.static OffsetDateTime
OffsetDateTime.of(LocalDateTime dateTime, ZoneOffset offset)
Obtains an instance ofOffsetDateTime
from a date-time and offset.static OffsetTime
OffsetTime.of(int hour, int minute, int second, int nanoOfSecond, ZoneOffset offset)
Obtains an instance ofOffsetTime
from an hour, minute, second and nanosecond.static OffsetTime
OffsetTime.of(LocalTime time, ZoneOffset offset)
Obtains an instance ofOffsetTime
from a local time and an offset.static LocalDateTime
LocalDateTime.ofEpochSecond(long epochSecond, int nanoOfSecond, ZoneOffset offset)
Obtains an instance ofLocalDateTime
using seconds from the epoch of 1970-01-01T00:00:00Z.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 ZoneId
ZoneId.ofOffset(String prefix, ZoneOffset offset)
Obtains an instance ofZoneId
wrapping an offset.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.OffsetDateTime.withOffsetSameInstant(ZoneOffset offset)
Returns a copy of thisOffsetDateTime
with the specified offset ensuring that the result is at the same instant.OffsetTime.withOffsetSameInstant(ZoneOffset offset)
Returns a copy of thisOffsetTime
with the specified offset ensuring that the result is at the same instant on an implied day.OffsetDateTime.withOffsetSameLocal(ZoneOffset offset)
Returns a copy of thisOffsetDateTime
with the specified offset ensuring that the result has the same local date-time.OffsetTime.withOffsetSameLocal(ZoneOffset offset)
Returns a copy of thisOffsetTime
with the specified offset ensuring that the result has the same local time. -
Uses of ZoneOffset in org.threeten.bp.chrono
Methods in org.threeten.bp.chrono that return ZoneOffsetModifier and TypeMethodDescriptionabstract ZoneOffset
ChronoZonedDateTime.getOffset()
Gets the zone offset, such as '+01:00'.Methods in org.threeten.bp.chrono with parameters of type ZoneOffsetModifier and TypeMethodDescriptionlong
ChronoLocalDateTime.toEpochSecond(ZoneOffset offset)
Converts this date-time to the number of seconds from the epoch of 1970-01-01T00:00:00Z.ChronoLocalDateTime.toInstant(ZoneOffset offset)
Converts this date-time to anInstant
. -
Uses of ZoneOffset in org.threeten.bp.temporal
Methods in org.threeten.bp.temporal that return types with arguments of type ZoneOffsetModifier and TypeMethodDescriptionstatic TemporalQuery<ZoneOffset>
TemporalQueries.offset()
A query forZoneOffset
returning null if not found. -
Uses of ZoneOffset in org.threeten.bp.zone
Methods in org.threeten.bp.zone that return ZoneOffsetModifier and TypeMethodDescriptionabstract ZoneOffset
Gets the offset applicable at the specified instant in these rules.abstract ZoneOffset
ZoneRules.getOffset(LocalDateTime localDateTime)
Gets a suitable offset for the specified local date-time in these rules.ZoneOffsetTransition.getOffsetAfter()
Gets the offset after the transition.ZoneOffsetTransitionRule.getOffsetAfter()
Gets the offset after the transition.ZoneOffsetTransition.getOffsetBefore()
Gets the offset before the transition.ZoneOffsetTransitionRule.getOffsetBefore()
Gets the offset before the transition.ZoneOffsetTransitionRule.getStandardOffset()
Gets the standard offset in force at the transition.abstract ZoneOffset
ZoneRules.getStandardOffset(Instant instant)
Gets the standard offset for the specified instant in this zone.Methods in org.threeten.bp.zone that return types with arguments of type ZoneOffsetModifier and TypeMethodDescriptionabstract List<ZoneOffset>
ZoneRules.getValidOffsets(LocalDateTime localDateTime)
Gets the offset applicable at the specified local date-time in these rules.Methods in org.threeten.bp.zone with parameters of type ZoneOffsetModifier and TypeMethodDescriptionZoneOffsetTransitionRule.TimeDefinition.createDateTime(LocalDateTime dateTime, ZoneOffset standardOffset, ZoneOffset wallOffset)
Converts the specified local date-time to the local date-time actually seen on a wall clock.boolean
ZoneOffsetTransition.isValidOffset(ZoneOffset offset)
Checks if the specified offset is valid during this transition.abstract boolean
ZoneRules.isValidOffset(LocalDateTime localDateTime, ZoneOffset offset)
Checks if the offset date-time is valid for these rules.static ZoneOffsetTransition
ZoneOffsetTransition.of(LocalDateTime transition, ZoneOffset offsetBefore, ZoneOffset offsetAfter)
Obtains an instance defining a transition between two offsets.static ZoneOffsetTransitionRule
ZoneOffsetTransitionRule.of(Month month, int dayOfMonthIndicator, DayOfWeek dayOfWeek, LocalTime time, boolean timeEndOfDay, ZoneOffsetTransitionRule.TimeDefinition timeDefnition, ZoneOffset standardOffset, ZoneOffset offsetBefore, ZoneOffset offsetAfter)
Obtains an instance defining the yearly rule to create transitions between two offsets.static ZoneRules
ZoneRules.of(ZoneOffset offset)
Obtains an instance ofZoneRules
that always uses the same offset.static ZoneRules
ZoneRules.of(ZoneOffset baseStandardOffset, ZoneOffset baseWallOffset, List<ZoneOffsetTransition> standardOffsetTransitionList, List<ZoneOffsetTransition> transitionList, List<ZoneOffsetTransitionRule> lastRules)
Obtains an instance ofZoneRules
with full transition rules.