Uses of Class
javax.time.Instant

Packages that use Instant
Package
Description
Provides classes to manage the continuous time scale including a wrapper for the system clock.
Provides classes to manage the human time scale including date, time, date-time and time-zone representations.
Provides classes to implement time-zones and their rules.
  • Uses of Instant in javax.time

    Fields in javax.time declared as Instant
    Modifier and Type
    Field
    Description
    static final Instant
    Instant.EPOCH
    Constant for the 1970-01-01T00:00:00Z epoch instant.
    private final Instant
    TimeSource.FixedTimeSource.instant
    The fixed instant to return.
    Methods in javax.time that return Instant
    Modifier and Type
    Method
    Description
    protected Instant
    UTCRules.convertToInstant(UTCInstant utcInstant)
    Converts a UTCInstant to an Instant.
    private static Instant
    Instant.create(long seconds, int nanoOfSecond)
    Obtains an instance of Instant using seconds and nanoseconds.
    TimeSource.FixedTimeSource.instant()
    Gets the current Instant.
    abstract Instant
    TimeSource.instant()
    Gets the current Instant.
    TimeSource.OffsetSystemTimeSource.instant()
    Gets the current Instant.
    TimeSource.SystemTimeSource.instant()
    Gets the current Instant.
    Instant.minus(long amount, TimeUnit unit)
    Returns a copy of this duration with the specified duration subtracted.
    Instant.minus(Duration duration)
    Returns a copy of this instant with the specified duration subtracted.
    Instant.minusMillis(long millisToSubtract)
    Returns a copy of this instant with the specified duration in milliseconds subtracted.
    Instant.minusNanos(long nanosToSubtract)
    Returns a copy of this instant with the specified duration in nanoseconds subtracted.
    Instant.minusSeconds(long secondsToSubtract)
    Returns a copy of this instant with the specified duration in seconds subtracted.
    static Instant
    Instant.now()
    Obtains the current instant from the system time-source in the default time-zone.
    static Instant
    Instant.now(TimeSource timeSource)
    Obtains the current instant from the specified clock.
    static Instant
    Instant.of(InstantProvider instantProvider)
    Obtains an instance of Instant from a provider of instants.
    static Instant
    Instant.ofEpochMillis(long epochMillis)
    Obtains an instance of Instant using milliseconds from the epoch of 1970-01-01T00:00:00Z.
    static Instant
    Instant.ofEpochNanos(long epochNanos)
    Obtains an instance of Instant using nanoseconds from the epoch of 1970-01-01T00:00:00Z.
    static Instant
    Instant.ofEpochNanos(BigInteger epochNanos)
    Obtains an instance of Instant using nanoseconds from the epoch of 1970-01-01T00:00:00Z.
    static Instant
    Instant.ofEpochSeconds(long epochSeconds)
    Obtains an instance of Instant using seconds from the epoch of 1970-01-01T00:00:00Z.
    static Instant
    Instant.ofEpochSeconds(long epochSeconds, long nanoAdjustment)
    Obtains an instance of Instant using seconds from the epoch of 1970-01-01T00:00:00Z and nanosecond fraction of second.
    static Instant
    Instant.ofEpochSeconds(BigDecimal epochSeconds)
    Obtains an instance of Instant using seconds from the epoch of 1970-01-01T00:00:00Z.
    static Instant
    Instant.parse(String text)
    Obtains an instance of Instant by parsing a string.
    private Instant
    Instant.plus(long secondsToAdd, long nanosToAdd)
    Returns a copy of this instant with the specified duration added.
    Instant.plus(long amount, TimeUnit unit)
    Returns a copy of this duration with the specified duration added.
    Instant.plus(Duration duration)
    Returns a copy of this instant with the specified duration added.
    Instant.plusMillis(long millisToAdd)
    Returns a copy of this instant with the specified duration in milliseconds added.
    Instant.plusNanos(long nanosToAdd)
    Returns a copy of this instant with the specified duration in nanoseconds added.
    Instant.plusSeconds(long secondsToAdd)
    Returns a copy of this instant with the specified duration in seconds added.
    Instant.toInstant()
    Converts this instant to an Instant, trivially returning this.
    InstantProvider.toInstant()
    Returns an instance of Instant initialized from the state of this object.
    TAIInstant.toInstant()
    Converts this instant to an Instant using the system default leap second rules.
    UTCInstant.toInstant()
    Converts this instant to an Instant using the system default leap second rules.
    Methods in javax.time with parameters of type Instant
    Modifier and Type
    Method
    Description
    int
    Instant.compareTo(Instant otherInstant)
    Compares this instant to the specified instant.
    protected UTCInstant
    UTCRules.convertToUTC(Instant instant)
    Converts an Instant to a UTCInstant.
    boolean
    Instant.isAfter(Instant otherInstant)
    Checks if this instant is after the specified instant.
    boolean
    Instant.isBefore(Instant otherInstant)
    Checks if this instant is before the specified instant.
    static TAIInstant
    TAIInstant.of(Instant instant)
    Obtains an instance of TAIInstant from an Instant using the system default leap second rules.
    static UTCInstant
    UTCInstant.of(Instant instant)
    Obtains an instance of UTCInstant from a provider of instants using the system default leap second rules.
    static UTCInstant
    UTCInstant.of(Instant instant, UTCRules rules)
    Obtains an instance of UTCInstant from a provider of instants using the specified leap second rules.
    Constructors in javax.time with parameters of type Instant
    Modifier
    Constructor
    Description
    private
    FixedTimeSource(Instant fixedInstant)
    Restricted constructor.
  • Uses of Instant in javax.time.calendar

    Methods in javax.time.calendar that return Instant
    Modifier and Type
    Method
    Description
    Clock.instant()
    Gets the current instant.
    OffsetDate.toInstant()
    Converts this date to an Instant at midnight.
    OffsetDateTime.toInstant()
    Converts this date-time to an Instant.
    ZonedDateTime.toInstant()
    Converts this ZonedDateTime to an Instant.
  • Uses of Instant in javax.time.calendar.zone

    Methods in javax.time.calendar.zone that return Instant
    Modifier and Type
    Method
    Description
    ZoneOffsetTransition.getInstant()
    Gets the transition instant.
    Methods in javax.time.calendar.zone with parameters of type Instant
    Modifier and Type
    Method
    Description
    ZoneRules.getOffsetInfo(Instant instant)
    Gets the offset information for the specified instant in this zone.