equal
deleted
inserted
replaced
352 * Then, the instant and offset are used to calculate the local time. |
352 * Then, the instant and offset are used to calculate the local time. |
353 * |
353 * |
354 * @param instant the instant to create the time from, not null |
354 * @param instant the instant to create the time from, not null |
355 * @param zone the time-zone, which may be an offset, not null |
355 * @param zone the time-zone, which may be an offset, not null |
356 * @return the local time, not null |
356 * @return the local time, not null |
|
357 * @since 9 |
357 */ |
358 */ |
358 public static LocalTime ofInstant(Instant instant, ZoneId zone) { |
359 public static LocalTime ofInstant(Instant instant, ZoneId zone) { |
359 Objects.requireNonNull(instant, "instant"); |
360 Objects.requireNonNull(instant, "instant"); |
360 Objects.requireNonNull(zone, "zone"); |
361 Objects.requireNonNull(zone, "zone"); |
361 ZoneOffset offset = zone.getRules().getOffset(instant); |
362 ZoneOffset offset = zone.getRules().getOffset(instant); |