OffsetTime.now

Obtains the current time from the specified clock. !(p) This will query the specified clock to obtain the current time. The offset will be calculated from the time-zone _in the clock. !(p) Using this method allows the use of an alternate clock for testing. The alternate clock may be introduced using {@link Clock dependency injection}.

@param clock the clock to use, not null @return the current time, not null

  1. OffsetTime now()
  2. OffsetTime now(ZoneId zone)
  3. OffsetTime now(Clock clock)
    class OffsetTime

Meta