Uses of Class
java.time.OffsetTime

Packages that useOffsetTime
Package
Description
java.time
The main API for dates, times, instants, and durations.
  • Uses ofOffsetTime injava.time

    Fields injava.time declared asOffsetTime
    Modifier and Type
    Field
    Description
    static finalOffsetTime
    OffsetTime.MAX
    The maximum supportedOffsetTime, '23:59:59.999999999-18:00'.
    static finalOffsetTime
    OffsetTime.MIN
    The minimum supportedOffsetTime, '00:00:00+18:00'.
    Methods injava.time that returnOffsetTime
    Modifier and Type
    Method
    Description
    LocalTime.atOffset(ZoneOffset offset)
    Combines this time with an offset to create anOffsetTime.
    OffsetTime.from(TemporalAccessor temporal)
    Obtains an instance ofOffsetTime from a temporal object.
    OffsetTime.minus(long amountToSubtract,TemporalUnit unit)
    Returns a copy of this time with the specified amount subtracted.
    OffsetTime.minus(TemporalAmount amountToSubtract)
    Returns a copy of this time with the specified amount subtracted.
    OffsetTime.minusHours(long hours)
    Returns a copy of thisOffsetTime with the specified number of hours subtracted.
    OffsetTime.minusMinutes(long minutes)
    Returns a copy of thisOffsetTime with the specified number of minutes subtracted.
    OffsetTime.minusNanos(long nanos)
    Returns a copy of thisOffsetTime with the specified number of nanoseconds subtracted.
    OffsetTime.minusSeconds(long seconds)
    Returns a copy of thisOffsetTime with the specified number of seconds subtracted.
    OffsetTime.now()
    Obtains the current time from the system clock in the default time-zone.
    OffsetTime.now(Clock clock)
    Obtains the current time from the specified clock.
    OffsetTime.now(ZoneId zone)
    Obtains the current time from the system clock in the specified time-zone.
    OffsetTime.of(int hour, int minute, int second, int nanoOfSecond,ZoneOffset offset)
    Obtains an instance ofOffsetTime from an hour, minute, second and nanosecond.
    OffsetTime.of(LocalTime time,ZoneOffset offset)
    Obtains an instance ofOffsetTime from a local time and an offset.
    OffsetTime.ofInstant(Instant instant,ZoneId zone)
    Obtains an instance ofOffsetTime from anInstant and zone ID.
    OffsetTime.parse(CharSequence text)
    Obtains an instance ofOffsetTime from a text string such as10:15:30+01:00.
    OffsetTime.parse(CharSequence text,DateTimeFormatter formatter)
    Obtains an instance ofOffsetTime from a text string using a specific formatter.
    OffsetTime.plus(long amountToAdd,TemporalUnit unit)
    Returns a copy of this time with the specified amount added.
    OffsetTime.plus(TemporalAmount amountToAdd)
    Returns a copy of this time with the specified amount added.
    OffsetTime.plusHours(long hours)
    Returns a copy of thisOffsetTime with the specified number of hours added.
    OffsetTime.plusMinutes(long minutes)
    Returns a copy of thisOffsetTime with the specified number of minutes added.
    OffsetTime.plusNanos(long nanos)
    Returns a copy of thisOffsetTime with the specified number of nanoseconds added.
    OffsetTime.plusSeconds(long seconds)
    Returns a copy of thisOffsetTime with the specified number of seconds added.
    OffsetDateTime.toOffsetTime()
    Converts this date-time to anOffsetTime.
    OffsetTime.truncatedTo(TemporalUnit unit)
    Returns a copy of thisOffsetTime with the time truncated.
    OffsetTime.with(TemporalAdjuster adjuster)
    Returns an adjusted copy of this time.
    OffsetTime.with(TemporalField field, long newValue)
    Returns a copy of this time with the specified field set to a new value.
    OffsetTime.withHour(int hour)
    Returns a copy of thisOffsetTime with the hour-of-day altered.
    OffsetTime.withMinute(int minute)
    Returns a copy of thisOffsetTime with the minute-of-hour altered.
    OffsetTime.withNano(int nanoOfSecond)
    Returns a copy of thisOffsetTime with the nano-of-second altered.
    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.
    OffsetTime.withOffsetSameLocal(ZoneOffset offset)
    Returns a copy of thisOffsetTime with the specified offset ensuring that the result has the same local time.
    OffsetTime.withSecond(int second)
    Returns a copy of thisOffsetTime with the second-of-minute altered.
    Methods injava.time with parameters of typeOffsetTime
    Modifier and Type
    Method
    Description
    LocalDate.atTime(OffsetTime time)
    Combines this date with an offset time to create anOffsetDateTime.
    int
    OffsetTime.compareTo(OffsetTime other)
    Compares thisOffsetTime to another time.
    boolean
    OffsetTime.isAfter(OffsetTime other)
    Checks if the instant of thisOffsetTime is after that of the specified time applying both times to a common date.
    boolean
    OffsetTime.isBefore(OffsetTime other)
    Checks if the instant of thisOffsetTime is before that of the specified time applying both times to a common date.
    boolean
    OffsetTime.isEqual(OffsetTime other)
    Checks if the instant of thisOffsetTime is equal to that of the specified time applying both times to a common date.