Example #1
0
 /**
  * Combines this date with an offset time to create an {@code OffsetDateTime}.
  * <p>
  * This returns an {@code OffsetDateTime} formed from this date at the specified time.
  * All possible combinations of date and time are valid.
  *
  * @param OffsetTime $time the time to combine with, not null
  * @return OffsetDateTime the offset date-time formed from this date and the specified time, not null
  */
 public function atOffsetTime(OffsetTime $time)
 {
     return OffsetDateTime::ofDateTime(LocalDateTime::ofDateAndTime($this, $time->toLocalTime()), $time->getOffset());
 }
 private function convertInstant(OffsetTime $ot)
 {
     return self::DATE()->atTime($ot->toLocalTime())->toInstant($ot->getOffset());
 }