adjustTime method

OffsetDateTime adjustTime(
  1. LocalTime adjuster(
    1. LocalTime
    )
)

Returns this date/time, with the given time adjuster applied to it, maintaining the existing date and offset.

If the adjuster attempts to construct an invalid time, any exception thrown by that construction attempt will be propagated through this method.

  • adjuster: The adjuster to apply.

Returns: The adjusted offset date/time.

Implementation

OffsetDateTime adjustTime(LocalTime Function(LocalTime) adjuster) {
  return OffsetDateTime(localDateTime.adjustTime(adjuster), offset);
}