set

open fun set(adjuster: TemporalAdjuster)

Adjusts this clock.

Atomically updates this clock to the value of the following expression:

  ZonedDateTime.now(thisClock)
               .with(adjuster)
               .toInstant()

Parameters

adjuster

the adjuster to use, not null

See also

Throws

if the adjustment cannot be made

if numeric overflow occurs


open fun set(field: TemporalField, newValue: Long)

Alters the specified field of this clock.

Atomically updates this clock to the value of the following expression:

  ZonedDateTime.now(thisClock)
               .with(field, newValue)
               .toInstant()

Parameters

field

the field to set, not null

newValue

the new value of the field

See also

Throws

if the field cannot be set

if numeric overflow occurs