Uses of Class
java.time.ZoneOffset
Packages that useZoneOffset
Package
Description
The main API for dates, times, instants, and durations.
Generic API for calendar systems other than the default ISO.
Access to date and time using fields and units, and date time adjusters.
Support for time-zones and their rules.
Uses ofZoneOffset injava.time
Fields injava.time declared asZoneOffsetModifier and TypeFieldDescriptionstatic finalZoneOffsetZoneOffset.MAXConstant for the maximum supported offset.static finalZoneOffsetZoneOffset.MINConstant for the minimum supported offset.static finalZoneOffsetZoneOffset.UTCThe time-zone offset for UTC, with an ID of 'Z'.Methods injava.time that returnZoneOffsetModifier and TypeMethodDescriptionstaticZoneOffsetZoneOffset.from(TemporalAccessor temporal) Obtains an instance ofZoneOffsetfrom 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'.staticZoneOffsetObtains an instance ofZoneOffsetusing the ID.staticZoneOffsetZoneOffset.ofHours(int hours) Obtains an instance ofZoneOffsetusing an offset in hours.staticZoneOffsetZoneOffset.ofHoursMinutes(int hours, int minutes) Obtains an instance ofZoneOffsetusing an offset in hours and minutes.staticZoneOffsetZoneOffset.ofHoursMinutesSeconds(int hours, int minutes, int seconds) Obtains an instance ofZoneOffsetusing an offset in hours, minutes and seconds.staticZoneOffsetZoneOffset.ofTotalSeconds(int totalSeconds) Obtains an instance ofZoneOffsetspecifying the total offset in secondsMethods injava.time with parameters of typeZoneOffsetModifier 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.intZoneOffset.compareTo(ZoneOffset other) Compares this offset to another offset in descending order.staticOffsetDateTimeOffsetDateTime.of(int year, int month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond,ZoneOffset offset) Obtains an instance ofOffsetDateTimefrom a year, month, day, hour, minute, second, nanosecond and offset.staticOffsetDateTimeOffsetDateTime.of(LocalDate date,LocalTime time,ZoneOffset offset) Obtains an instance ofOffsetDateTimefrom a date, time and offset.staticOffsetDateTimeOffsetDateTime.of(LocalDateTime dateTime,ZoneOffset offset) Obtains an instance ofOffsetDateTimefrom a date-time and offset.staticOffsetTimeOffsetTime.of(int hour, int minute, int second, int nanoOfSecond,ZoneOffset offset) Obtains an instance ofOffsetTimefrom an hour, minute, second and nanosecond.staticOffsetTimeOffsetTime.of(LocalTime time,ZoneOffset offset) Obtains an instance ofOffsetTimefrom a local time and an offset.staticLocalDateTimeLocalDateTime.ofEpochSecond(long epochSecond, int nanoOfSecond,ZoneOffset offset) Obtains an instance ofLocalDateTimeusing seconds from the epoch of 1970-01-01T00:00:00Z.staticZonedDateTimeZonedDateTime.ofInstant(LocalDateTime localDateTime,ZoneOffset offset,ZoneId zone) Obtains an instance ofZonedDateTimefrom the instant formed by combining the local date-time and offset.staticZonedDateTimeZonedDateTime.ofLocal(LocalDateTime localDateTime,ZoneId zone,ZoneOffset preferredOffset) Obtains an instance ofZonedDateTimefrom a local date-time using the preferred offset if possible.staticZoneIdZoneId.ofOffset(String prefix,ZoneOffset offset) Obtains an instance ofZoneIdwrapping an offset.staticZonedDateTimeZonedDateTime.ofStrict(LocalDateTime localDateTime,ZoneOffset offset,ZoneId zone) Obtains an instance ofZonedDateTimestrictly validating the combination of local date-time, offset and zone ID.longLocalDate.toEpochSecond(LocalTime time,ZoneOffset offset) Converts thisLocalDateto the number of seconds since the epoch of 1970-01-01T00:00:00Z.longLocalTime.toEpochSecond(LocalDate date,ZoneOffset offset) Converts thisLocalTimeto the number of seconds since the epoch of 1970-01-01T00:00:00Z.OffsetDateTime.withOffsetSameInstant(ZoneOffset offset) Returns a copy of thisOffsetDateTimewith the specified offset ensuring that the result is at the same instant.OffsetTime.withOffsetSameInstant(ZoneOffset offset) Returns a copy of thisOffsetTimewith the specified offset ensuring that the result is at the same instant on an implied day.OffsetDateTime.withOffsetSameLocal(ZoneOffset offset) Returns a copy of thisOffsetDateTimewith the specified offset ensuring that the result has the same local date-time.OffsetTime.withOffsetSameLocal(ZoneOffset offset) Returns a copy of thisOffsetTimewith the specified offset ensuring that the result has the same local time.Uses ofZoneOffset injava.time.chrono
Methods injava.time.chrono that returnZoneOffsetModifier and TypeMethodDescriptionChronoZonedDateTime.getOffset()Gets the zone offset, such as '+01:00'.Methods injava.time.chrono with parameters of typeZoneOffsetModifier and TypeMethodDescriptiondefault longChronology.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 longChronology.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.longIsoChronology.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 longChronoLocalDateTime.toEpochSecond(ZoneOffset offset) Converts this date-time to the number of seconds from the epoch of 1970-01-01T00:00:00Z.defaultInstantChronoLocalDateTime.toInstant(ZoneOffset offset) Converts this date-time to anInstant.Uses ofZoneOffset injava.time.temporal
Methods injava.time.temporal that return types with arguments of typeZoneOffsetModifier and TypeMethodDescriptionstaticTemporalQuery<ZoneOffset>TemporalQueries.offset()A query forZoneOffsetreturning null if not found.Uses ofZoneOffset injava.time.zone
Methods injava.time.zone that returnZoneOffsetModifier and TypeMethodDescriptionGets the offset applicable at the specified instant in these rules.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.ZoneRules.getStandardOffset(Instant instant) Gets the standard offset for the specified instant in this zone.Methods injava.time.zone that return types with arguments of typeZoneOffsetModifier and TypeMethodDescriptionZoneRules.getValidOffsets(LocalDateTime localDateTime) Gets the offset applicable at the specified local date-time in these rules.Methods injava.time.zone with parameters of typeZoneOffsetModifier 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.booleanZoneOffsetTransition.isValidOffset(ZoneOffset offset) Checks if the specified offset is valid during this transition.booleanZoneRules.isValidOffset(LocalDateTime localDateTime,ZoneOffset offset) Checks if the offset date-time is valid for these rules.staticZoneOffsetTransitionZoneOffsetTransition.of(LocalDateTime transition,ZoneOffset offsetBefore,ZoneOffset offsetAfter) Obtains an instance defining a transition between two offsets.staticZoneOffsetTransitionRuleZoneOffsetTransitionRule.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.staticZoneRulesZoneRules.of(ZoneOffset offset) Obtains an instance of ZoneRules that has fixed zone rules.staticZoneRulesZoneRules.of(ZoneOffset baseStandardOffset,ZoneOffset baseWallOffset,List<ZoneOffsetTransition> standardOffsetTransitionList,List<ZoneOffsetTransition> transitionList,List<ZoneOffsetTransitionRule> lastRules) Obtains an instance of a ZoneRules.