Uses of Class java.time.ZoneOffset (Java SE 26 & JDK 26)
Description: use: module: java.base, package: java.time, class: ZoneOffset

# Uses of Class
java.time.ZoneOffset

Packages that use ZoneOffset
Package
Description
java.time
The main API for dates, times, instants, and durations.
java.time.chrono
Generic API for calendar systems other than the default ISO.
java.time.temporal
Access to date and time using fields and units, and date time adjusters.
java.time.zone
Support for time-zones and their rules.

- ## Uses of ZoneOffset in java.time

  Classes in java.time that implement interfaces with type arguments of type ZoneOffset
  Modifier and Type
  Class
  Description
  `final class`
  `ZoneOffset`
  A time-zone offset from Greenwich/UTC, such as `+02:00`.
  Fields in java.time declared as ZoneOffset
  Modifier and Type
  Field
  Description
  `static final ZoneOffset`
  ZoneOffset.`MAX`
  Constant for the maximum supported offset.
  `static final ZoneOffset`
  ZoneOffset.`MIN`
  Constant for the minimum supported offset.
  `static final ZoneOffset`
  ZoneOffset.`UTC`
  The time-zone offset for UTC, with an ID of 'Z'.
  Methods in java.time that return ZoneOffset
  Modifier and Type
  Method
  Description
  `static ZoneOffset`
  ZoneOffset.`from(TemporalAccessor temporal)`
  Obtains an instance of `ZoneOffset` from a temporal object.
  `ZoneOffset`
  OffsetDateTime.`getOffset()`
  Gets the zone offset, such as '+01:00'.
  `ZoneOffset`
  OffsetTime.`getOffset()`
  Gets the zone offset, such as '+01:00'.
  `ZoneOffset`
  ZonedDateTime.`getOffset()`
  Gets the zone offset, such as '+01:00'.
  `static ZoneOffset`
  ZoneOffset.`of(String offsetId)`
  Obtains an instance of `ZoneOffset` using the ID.
  `static ZoneOffset`
  ZoneOffset.`ofHours(int hours)`
  Obtains an instance of `ZoneOffset` using an offset in hours.
  `static ZoneOffset`
  ZoneOffset.`ofHoursMinutes(int hours, int minutes)`
  Obtains an instance of `ZoneOffset` using an offset in hours and minutes.
  `static ZoneOffset`
  ZoneOffset.`ofHoursMinutesSeconds(int hours, int minutes, int seconds)`
  Obtains an instance of `ZoneOffset` using an offset in hours, minutes and seconds.
  `static ZoneOffset`
  ZoneOffset.`ofTotalSeconds(int totalSeconds)`
  Obtains an instance of `ZoneOffset` specifying the total offset in seconds
  Methods in java.time with parameters of type ZoneOffset
  Modifier and Type
  Method
  Description
  `OffsetDateTime`
  Instant.`atOffset(ZoneOffset offset)`
  Combines this instant with an offset to create an `OffsetDateTime`.
  `OffsetDateTime`
  LocalDateTime.`atOffset(ZoneOffset offset)`
  Combines this date-time with an offset to create an `OffsetDateTime`.
  `OffsetTime`
  LocalTime.`atOffset(ZoneOffset offset)`
  Combines this time with an offset to create an `OffsetTime`.
  `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 of `OffsetDateTime` from a year, month, day, hour, minute, second, nanosecond and offset.
  `static OffsetDateTime`
  OffsetDateTime.`of(LocalDate date, LocalTime time, ZoneOffset offset)`
  Obtains an instance of `OffsetDateTime` from a date, time and offset.
  `static OffsetDateTime`
  OffsetDateTime.`of(LocalDateTime dateTime, ZoneOffset offset)`
  Obtains an instance of `OffsetDateTime` from a date-time and offset.
  `static OffsetTime`
  OffsetTime.`of(int hour, int minute, int second, int nanoOfSecond, ZoneOffset offset)`
  Obtains an instance of `OffsetTime` from an hour, minute, second and nanosecond.
  `static OffsetTime`
  OffsetTime.`of(LocalTime time, ZoneOffset offset)`
  Obtains an instance of `OffsetTime` from a local time and an offset.
  `static LocalDateTime`
  LocalDateTime.`ofEpochSecond(long epochSecond, int nanoOfSecond, ZoneOffset offset)`
  Obtains an instance of `LocalDateTime` using seconds from the epoch of 1970-01-01T00:00:00Z.
  `static ZonedDateTime`
  ZonedDateTime.`ofInstant(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone)`
  Obtains an instance of `ZonedDateTime` 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 of `ZonedDateTime` from a local date-time using the preferred offset if possible.
  `static ZoneId`
  ZoneId.`ofOffset(String prefix, ZoneOffset offset)`
  Obtains an instance of `ZoneId` wrapping an offset.
  `static ZonedDateTime`
  ZonedDateTime.`ofStrict(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone)`
  Obtains an instance of `ZonedDateTime` strictly validating the combination of local date-time, offset and zone ID.
  `long`
  LocalDate.`toEpochSecond(LocalTime time, ZoneOffset offset)`
  Converts this `LocalDate` to the number of seconds since the epoch of 1970-01-01T00:00:00Z.
  `long`
  LocalTime.`toEpochSecond(LocalDate date, ZoneOffset offset)`
  Converts this `LocalTime` to the number of seconds since the epoch of 1970-01-01T00:00:00Z.
  `OffsetDateTime`
  OffsetDateTime.`withOffsetSameInstant(ZoneOffset offset)`
  Returns a copy of this `OffsetDateTime` with the specified offset ensuring that the result is at the same instant.
  `OffsetTime`
  OffsetTime.`withOffsetSameInstant(ZoneOffset offset)`
  Returns a copy of this `OffsetTime` with the specified offset ensuring that the result is at the same instant on an implied day.
  `OffsetDateTime`
  OffsetDateTime.`withOffsetSameLocal(ZoneOffset offset)`
  Returns a copy of this `OffsetDateTime` with the specified offset ensuring that the result has the same local date-time.
  `OffsetTime`
  OffsetTime.`withOffsetSameLocal(ZoneOffset offset)`
  Returns a copy of this `OffsetTime` with the specified offset ensuring that the result has the same local time.

- ## Uses of ZoneOffset in java.time.chrono

  Methods in java.time.chrono that return ZoneOffset
  Modifier and Type
  Method
  Description
  `ZoneOffset`
  ChronoZonedDateTime.`getOffset()`
  Gets the zone offset, such as '+01:00'.
  Methods in java.time.chrono with parameters of type ZoneOffset
  Modifier and Type
  Method
  Description
  `default long`
  Chronology.`epochSecond(int prolepticYear, int month, int dayOfMonth, int hour, int minute, int second, ZoneOffset zoneOffset)`
  Gets the number of seconds from the epoch of 1970-01-01T00:00:00Z.
  `default long`
  Chronology.`epochSecond(Era era, int yearOfEra, int month, int dayOfMonth, int hour, int minute, int second, ZoneOffset zoneOffset)`
  Gets the number of seconds from the epoch of 1970-01-01T00:00:00Z.
  `long`
  IsoChronology.`epochSecond(int prolepticYear, int month, int dayOfMonth, int hour, int minute, int second, ZoneOffset zoneOffset)`
  Gets the number of seconds from the epoch of 1970-01-01T00:00:00Z.
  `default long`
  ChronoLocalDateTime.`toEpochSecond(ZoneOffset offset)`
  Converts this date-time to the number of seconds from the epoch of 1970-01-01T00:00:00Z.
  `default Instant`
  ChronoLocalDateTime.`toInstant(ZoneOffset offset)`
  Converts this date-time to an `Instant`.

- ## Uses of ZoneOffset in java.time.temporal

  Methods in java.time.temporal that return types with arguments of type ZoneOffset
  Modifier and Type
  Method
  Description
  `static TemporalQuery<ZoneOffset>`
  TemporalQueries.`offset()`
  A query for `ZoneOffset` returning null if not found.

- ## Uses of ZoneOffset in java.time.zone

  Methods in java.time.zone that return ZoneOffset
  Modifier and Type
  Method
  Description
  `ZoneOffset`
  ZoneRules.`getOffset(Instant instant)`
  Gets the offset applicable at the specified instant in these rules.
  `ZoneOffset`
  ZoneRules.`getOffset(LocalDateTime localDateTime)`
  Gets a suitable offset for the specified local date-time in these rules.
  `ZoneOffset`
  ZoneOffsetTransition.`getOffsetAfter()`
  Gets the offset after the transition.
  `ZoneOffset`
  ZoneOffsetTransitionRule.`getOffsetAfter()`
  Gets the offset after the transition.
  `ZoneOffset`
  ZoneOffsetTransition.`getOffsetBefore()`
  Gets the offset before the transition.
  `ZoneOffset`
  ZoneOffsetTransitionRule.`getOffsetBefore()`
  Gets the offset before the transition.
  `ZoneOffset`
  ZoneOffsetTransitionRule.`getStandardOffset()`
  Gets the standard offset in force at the transition.
  `ZoneOffset`
  ZoneRules.`getStandardOffset(Instant instant)`
  Gets the standard offset for the specified instant in this zone.
  Methods in java.time.zone that return types with arguments of type ZoneOffset
  Modifier and Type
  Method
  Description
  `List<ZoneOffset>`
  ZoneRules.`getValidOffsets(LocalDateTime localDateTime)`
  Gets the offset applicable at the specified local date-time in these rules.
  Methods in java.time.zone with parameters of type ZoneOffset
  Modifier and Type
  Method
  Description
  `LocalDateTime`
  ZoneOffsetTransitionRule.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.
  `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 timeDefinition, 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 of ZoneRules that has fixed zone rules.
  `static ZoneRules`
  ZoneRules.`of(ZoneOffset baseStandardOffset, ZoneOffset baseWallOffset, List<ZoneOffsetTransition> standardOffsetTransitionList, List<ZoneOffsetTransition> transitionList, List<ZoneOffsetTransitionRule> lastRules)`
  Obtains an instance of a ZoneRules.